Why doesn't this script work with successive page clicks?
I am currently using the following script in Tampermonkey in Google Chrome: // ==UserScript== // @name Youtube opt in Ads per channel // @namespace schippi // @include http://www.youtube.com/watch* // @version 1 // ==/UserScript== var u = window.location.href; if (u.search("user=") == -1) { var cont = document.getElementById("watch7-user-header").innerHTML; var user=cont.replace(/.+\/user\//i,'').replace(/\?(?:.|\s)*/m,''); window.location.href = u+"&user="+user; } It seems to work perfectly in Firefox with Greasemonkey but in Google Chrome, it seems that it only works on the first click on a