Page 1 of 1

Surrogates break GreaseMonkey userscript.

Posted: Thu Mar 02, 2017 9:13 pm
by alexo
There is a very useful GreaseMonkey userscript called "Direct Links for Pages and Images" (here).
Unfortunately, the Noscript surrogates break its functionality.

Steps to reproduce:
1. Install Noscript, GreaseMonkey and "Direct Links for Pages and Images" (https://greasyfork.org/en/scripts/19210 ... -and-image)
2. Do a Google image search (for example: https://encrypted.google.com/search?q=cat&tbm=isch)
3. Click on the "Tools" button
4. The page gets redirected to https://encrypted.google.com/null

Disabling the surrogate scripts avoids this problem.

Can this be fixed?

Thank you!

Re: Surrogates break GreaseMonkey userscript.

Posted: Thu Mar 02, 2017 9:17 pm
by barbaz
Thanks for letting us know! Try blanking out about:config > noscript.surrogate.glinks.replacement

I think the clash comes from the two scripts both trying to do the same thing.

Re: Surrogates break GreaseMonkey userscript.

Posted: Thu Mar 02, 2017 9:53 pm
by alexo
Thank you, it works!

What are the consequences of doing it, if any?

Re: Surrogates break GreaseMonkey userscript.

Posted: Thu Mar 02, 2017 10:38 pm
by barbaz
As long as you have that Greasemonkey script enabled, you probably won't notice any consequence. But if you turn off the Greasemonkey script as well, Google search links will start redirecting again.

Re: Surrogates break GreaseMonkey userscript.

Posted: Fri Mar 03, 2017 7:57 pm
by alexo
It turns out that for some reason some of my surrogates were different from the default ones. I am pretty sure that I did not change them myself (I am not a JS coder).
Is there a way to reset them (but not the other settings) to the default scripts?

Re: Surrogates break GreaseMonkey userscript.

Posted: Fri Mar 03, 2017 8:59 pm
by barbaz
about:config
right-click the entry > Reset