Surrogates break GreaseMonkey userscript.

Proposals for new surrogate scripts, updates/bug fixes to existing ones, tips and tricks to work around the lazy web.
Post Reply
alexo
Junior Member
Posts: 23
Joined: Fri Nov 27, 2009 5:58 pm

Surrogates break GreaseMonkey userscript.

Post 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!
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: Surrogates break GreaseMonkey userscript.

Post 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.
*Always* check the changelogs BEFORE updating that important software!
-
alexo
Junior Member
Posts: 23
Joined: Fri Nov 27, 2009 5:58 pm

Re: Surrogates break GreaseMonkey userscript.

Post by alexo »

Thank you, it works!

What are the consequences of doing it, if any?
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: Surrogates break GreaseMonkey userscript.

Post 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.
*Always* check the changelogs BEFORE updating that important software!
-
alexo
Junior Member
Posts: 23
Joined: Fri Nov 27, 2009 5:58 pm

Re: Surrogates break GreaseMonkey userscript.

Post 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?
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: Surrogates break GreaseMonkey userscript.

Post by barbaz »

about:config
right-click the entry > Reset
*Always* check the changelogs BEFORE updating that important software!
-
Post Reply