Possible to request ajax.googleapis.com surrogate?

Proposals for new surrogate scripts, updates/bug fixes to existing ones, tips and tricks to work around the lazy web.
Post Reply
Username
Posts: 3
Joined: Sat Jan 17, 2015 10:42 pm

Possible to request ajax.googleapis.com surrogate?

Post by Username »

Hi,

Is it possible to request an ajax.googleapis.com surrogate that would allow http://www.frys.com/ads/view-all-store-ads to function without allowing the ajax.googleapis.com script to run? I noticed user thunderscript created a Microsoft one recently, viewtopic.php?f=26&t=20455, so I was curious if some knowledgeable person might be able to do the same for this.

Thanks.
Mozilla/5.0 (Windows NT 6.2; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0
barbaz
Senior Member
Posts: 10847
Joined: Sat Aug 03, 2013 5:45 pm

Re: Possible to request ajax.googleapis.com surrogate?

Post by barbaz »

... er.. that's one script, which is only an entire jquery library... that's not suitable for a default NoScript surrogate... :shock:

Anyway, see if this works?
1) download this script http://ajax.aspnetcdn.com/ajax/jQuery/j ... 9.1.min.js
2) go to about:config
right-click > new > string
name: noscript.surrogate.gjq191.replacement
value: file URL pointing to the script downloaded in (1)
3) also in about:config
right-click > new > string
name: noscript.surrogate.gjq191.sources
value: ^https?://ajax\.googleapis\.com/.*[^0-9A-Za-z]1\.9\.1[^0-9A-Za-z].*jquery\.min\.js
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Windows NT 5.2; rv:33.0) Gecko/20100101 SeaMonkey/2.30
Username
Posts: 3
Joined: Sat Jan 17, 2015 10:42 pm

Re: Possible to request ajax.googleapis.com surrogate?

Post by Username »

Thank you barbaz for the thoughtful and detailed response. Very helpful.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: Possible to request ajax.googleapis.com surrogate?

Post by Thrawn »

barbaz wrote:... er.. that's one script, which is only an entire jquery library... that's not suitable for a default NoScript surrogate... :shock:
Actually the minified JQuery 1.11.2 is only 95.9KB uncompressed (about 35KB compressed), and there's potential to re-use it as a surrogate in lots of places, so I don't think it's entirely unreasonable.

It could even make some sites safer by providing a forced JQuery upgrade :D
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.

True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0
Post Reply