Alterar os parâmetros de URL de uma página

Eu quero adicionar o parâmetro&vhs=1 no final de cada URL de vídeo do YouTube no meu navegador. Eu tentei usar o seguinte script, mas fica preso em um loop (continua adicionando&vhs=1 &vhs=1...).

// ==UserScript==
// @name        Youtube Tape Mode
// @namespace   _pc
// @match       *://*.youtube.com/watch?*
// @run-at      document-start
// ==/UserScript==

var oldUrlPath  = window.location.pathname;

/*--- Test that "&vhs=1" is at end of URL, excepting any "hashes"
or searches.
*/
if ( ! /\&vhs=1$/.test (oldUrlPath) ) {

    var newURL  = window.location.protocol + "//"
                + window.location.hostname
                + oldUrlPath 
                + window.location.search.replace + "&vhs=1"
                + window.location.hash
            ;
    /*-- replace() puts the good page in the history instead of the
        bad page.
    */
    window.location.replace (newURL);
}

Alguém pode oferecer algumas idéias e conselhos sobre como eu posso escrever o roteiro para esse fim? Eu não consigo descobrir como sair do problema do loop infinito.

questionAnswers(1)

yourAnswerToTheQuestion