Misc Surrogate Scripts Discussion

Proposals for new surrogate scripts, updates/bug fixes to existing ones, tips and tricks to work around the lazy web.
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: List of scripts for which NS runs surrogate[UPD 23 Feb 2

Post by Thrawn »

barbaz wrote:(diff output or full list? post here/PM?)
Full list via PM would be easiest; thanks :).
======
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:29.0) Gecko/20100101 Firefox/29.0
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: List of scripts for which NS runs surrogate[UPD 23 Feb 2

Post by barbaz »

Thrawn wrote:Full list via PM would be easiest; thanks :).
sent
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:29.0) Gecko/20100101 Firefox/29.0 SeaMonkey/2.26
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: List of scripts for which NS runs surrogate[UPD 23 Feb 2

Post by barbaz »

Giorgio Maone wrote:BTW, (@barbaz, too), would be the case of splitting this topic with a "Proposed Surrogates" one, in the development forum?
Sounds good to me, but e.g. my lazy load images surrogate above isn't really suitable for inclusion in the default list of surrogates IMO because it actually DOES lazy load images. I don't know whether you would still want to include that sort of thing in a topic called "Proposed Surrogates"?
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux i686; rv:34.0) Gecko/20100101 Firefox/34.0 SeaMonkey/2.30a1
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: List of scripts for which NS runs surrogate[UPD 23 Feb 2

Post by barbaz »

Oh and also, if you do that could you please merge this thread there too?
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux i686; rv:34.0) Gecko/20100101 Firefox/34.0 SeaMonkey/2.30a1
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Misc Surrogate Scripts Discussion

Post by Giorgio Maone »

barbaz wrote:Oh and also, if you do that could you please merge this thread there too?
I restructured this and other threads (not exhaustively) into a new "NoScript Surrogates" subforum, as the topic seems to be hot these days.
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0
member8263
Posts: 4
Joined: Tue Oct 07, 2014 2:15 pm

Re: Misc Surrogate Scripts Discussion

Post by member8263 »

With the recent MSN redesign I have been having issues with some of their pages that feature slideshows for their content. It is similar to the previous MSN Wonderwall issue that was solved with a Facebook surrogate update.

Any chance someone can look into a possible cause to let me know if this one might be something resolved with NoScript or what else I might try to fix it? Unfortunately I do not have to knowledge to figure it out on my own.

For example, none of these slideshows work for me.

http://www.msn.com/en-us/tv/gallery/gon ... ss-BB6phpD
http://www.msn.com/en-us/travel/article ... ss-BB7KOGF
http://www.msn.com/en-us/travel/other/h ... ss-BB79uXq

I have tried allowing msn, s-msn and jquery scripts with no changes. I am using ABP also but the blockable items log doesn't show anything blocked that looks related to something that would cause the slideshow content not to load.

I tried looking at the developer tools even though I don't understand them and all the sites have the same thing listed (with what appears to be no info on a cause).

: entertainment-js-9b-fc0a2fa87fe631bb20d343bf6e293e-ed985fd6:1
"onerror: : ;l1" ss-BB6phpD:26
h/<() ss-BB6phpD:26
no element found _log:1
Mozilla/5.0 (Windows NT 6.2; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: Misc Surrogate Scripts Discussion

Post by barbaz »

Using an older copy of my SeaMonkey 2.29.1 profile which had NoScript 2.6.8.43rc2 and an old version of my own fork of ABP:

Going to your second link just gave me a yellow error message from the browser that says

Code: Select all

XML Parsing Error: undefined entity
Location: http://www.msn.com/en-us/travel/article/aerial-views-of-europe-taken-using-a-drone/ss-BB7KOGF
Line Number 74, Column 43:
             <span class="attribution">© Amos Chapple/Rex</span>
------------------------------------------^
Third link worked for me with only

Code: Select all

+msn.com
+s-msn.com
+msads.net
Try again with those permissions?

ETA Third link works with NoScript latest development build also.
member8263 wrote:I am using ABP also but the blockable items log doesn't show anything blocked that looks related to something that would cause the slideshow content not to load.
ABP blockable items is not reliable.
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux x86_64; rv:37.6) Gecko/25272270 Firefox/37.6 SeaMonkey/8.24.9a1pre
member8263
Posts: 4
Joined: Tue Oct 07, 2014 2:15 pm

Re: Misc Surrogate Scripts Discussion

Post by member8263 »

I'm using 2.6.9 which looks like the latest build right?

Tried the thrid link that worked for you, http://www.msn.com/en-us/travel/other/h ... ss-BB79uXq, with msn, s-msn and msads.net allowed with no change for me. The slideshow doesn't ppear nor does the full screen icon in the lower right corner do anything for me.

That the full screen icon doesn't work for me either, does that confirm it is something related to javascript on my end or does that not necessarily help eliminate another cause?

Any other info I can provide that might help me figure out the cause? Is there a way to use something like the Firefox developer tools to have it list everything that is loading/not loading to go from there? Only things I can think of is something related to Noscript, ABP or maybe a cookie/cache issue? I was thinking it wasn't ABP because it seems javascript related but I don't have a clue.

Regarding surrogate scripts (apologies for posting what now seems like a support question in this thread as I originally thought it might have been surrogate related like a previous MSN Wonderwall slideshow issue which turned out to need an update for the Facebook surrogate script), is it possible to inquire about the possibility of ajax.googleapis.com and yahooapis.com surrogate scripts? Those seem to be needed from time to time yet Google and Yahoo aren't exactly known for caring for anything other than data mining so I imagine their scripts are more about that than functionality.

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

Re: Misc Surrogate Scripts Discussion

Post by barbaz »

member8263 wrote:I'm using 2.6.9 which looks like the latest build right?
Yes
member8263 wrote:Tried the thrid link that worked for you, http://www.msn.com/en-us/travel/other/h ... ss-BB79uXq, with msn, s-msn and msads.net allowed with no change for me. The slideshow doesn't ppear nor does the full screen icon in the lower right corner do anything for me.

That the full screen icon doesn't work for me either, does that confirm it is something related to javascript on my end or does that not necessarily help eliminate another cause?

Any other info I can provide that might help me figure out the cause? Is there a way to use something like the Firefox developer tools to have it list everything that is loading/not loading to go from there? Only things I can think of is something related to Noscript, ABP or maybe a cookie/cache issue? I was thinking it wasn't ABP because it seems javascript related but I don't have a clue.
In that case I suspect it's likely your ABP configuration causing the issue.
Does disabling ABP on msn.com get the slideshow working? If so, what subscriptions and custom filters are you using?
(I've added a few more subscriptions / filters since responding to your post. Think I'll give it a go with my new config in a bit and see if it still works. EDIT Yes, it does still work, but thumbnails are gone...)
member8263 wrote:Regarding surrogate scripts (apologies for posting what now seems like a support question in this thread as I originally thought it might have been surrogate related like a previous MSN Wonderwall slideshow issue which turned out to need an update for the Facebook surrogate script), is it possible to inquire about the possibility of ajax.googleapis.com and yahooapis.com surrogate scripts? Those seem to be needed from time to time yet Google and Yahoo aren't exactly known for caring for anything other than data mining so I imagine their scripts are more about that than functionality.
One possibility is described in viewtopic.php?f=10&t=19598&p=69224#p69225
(regarding jquery, note viewtopic.php?f=19&t=20117)
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (compatible; rv:17.1) Gecko/20603306 Firefox/17.1
member8263
Posts: 4
Joined: Tue Oct 07, 2014 2:15 pm

Re: Misc Surrogate Scripts Discussion

Post by member8263 »

barbaz wrote: In that case I suspect it's likely your ABP configuration causing the issue.
Does disabling ABP on msn.com get the slideshow working? If so, what subscriptions and custom filters are you using?
(I've added a few more subscriptions / filters since responding to your post. Think I'll give it a go with my new config in a bit and see if it still works. EDIT Yes, it does still work, but thumbnails are gone...)
I'm nervous on trying to disable it on sites to troubleshoot causes since I don't think ABP allows one to do temporarily and I am worried I will mess something up trying to get it back again. I was hoping that blockable items log was showing me everything that might be blocked but I wasn't aware that isn't reliable.

I am using Fanboy's Ultimate, https://www.fanboy.co.nz/filters.html, which is just the Easylist, easyprivacy, annoyances, social and trackers combined into one filter. I have custom filters for the following..

||platform.twitter.com/widgets.js
||facebook.com^
||facebook.net^
||fbcdn-profile-a.akamaihd.net^
||fbcdn.net^
||connect.facebook.net^
||apis.google.com/js/plusone.js
||api.skype.com/detection/*

But I also uncheck a lot of the things ABP allows through whitelists. Without being able to rely on the blockable items log to show me what might be blocked, I think that is making it difficult for me to figure out if it might be a lone filter causing an issue short of going the disable on site/page route.
One possibility is described in viewtopic.php?f=10&t=19598&p=69224#p69225
(regarding jquery, note viewtopic.php?f=19&t=20117)
Thanks for that tip. Unfortunately, I tried to wrap my head around how to do a custom one but can't seem to understand it. Sounds like the recent jquery info in that link makes it less appealing, even if I did understand how to go about doing it myself, with the insecurity of it.
Mozilla/5.0 (Windows NT 6.2; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: Misc Surrogate Scripts Discussion

Post by barbaz »

member8263 wrote:I have custom filters for the following..

||platform.twitter.com/widgets.js
||facebook.com^
||facebook.net^
||fbcdn-profile-a.akamaihd.net^
||fbcdn.net^
||connect.facebook.net^
||apis.google.com/js/plusone.js
||api.skype.com/detection/*
I have stricter versions of all of those and I can tell you that they are definitely not your problem.
(BTW suggest you get rid of ||connect.facebook.net^ because it's made redundant by ||facebook.net^)
member8263 wrote:I also uncheck a lot of the things ABP allows through whitelists.
That probably explains it. One of the subscription whitelists was active on that page for me.
Don't disable those whitelists unless you're really sure what you're doing. They are not there just for whitelisting ads or other junk, they are for working around issues that occur due to the blocking filters. Ad whitelisting is done in a separate subscription.
member8263 wrote:
One possibility is described in viewtopic.php?f=10&t=19598&p=69224#p69225
(regarding jquery, note viewtopic.php?f=19&t=20117)
Thanks for that tip. Unfortunately, I tried to wrap my head around how to do a custom one but can't seem to understand it. Sounds like the recent jquery info in that link makes it less appealing, even if I did understand how to go about doing it myself, with the insecurity of it.
You could download jquery from some other mirror site, such as ajax.aspnetcdn.com (Microsoft) (click the link I posted, don't try to go directly to the domain because that will just give you a not found page).
Here are the exact steps:
1) Download jQuery
2) Drag the downloaded file into the browser window, and copy the file: URL in the address bar
3) Go to about:config
4) Right-click, create string pref named "noscript.surrogate.jquery.replacement", for value, paste in the file: URL
5) Create string pref named "noscript.surrogate.jquery.sources", set it to, say

Code: Select all

^https?://.+/jquery.*\.js
(will make your downloaded jquery replace *all* blocked jquery; for a more specific variant to replace google jquery, see the other thread)
6) Test it: Go to a site with jquery loaded from google, then forbid googleapis. If it doesn't work, and if the file: URL has any spaces, replace each space with "%20" (without quotes) and try again.

Hope that helps
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (compatible; rv:17.1) Gecko/20603306 Firefox/17.1
member8263
Posts: 4
Joined: Tue Oct 07, 2014 2:15 pm

Re: Misc Surrogate Scripts Discussion

Post by member8263 »

barbaz wrote: I have stricter versions of all of those and I can tell you that they are definitely not your problem.
(BTW suggest you get rid of ||connect.facebook.net^ because it's made redundant by ||facebook.net^)
Thank you (this will be a recurring theme).
That probably explains it. One of the subscription whitelists was active on that page for me.
That was it. Stupid me for some reason was thinking one thing or the other and made the mistake of assuming a javascript, and surrogate issue due to that being the cause the only other time I had this issue, and couldn't figure it out. Not sure if it is just since MSN's redesign but they now require one to allow their msads.net script and to have the @@||ads1.msads.net/library/dapmsn.js$domain=msn.com whitelist in order for some of their content to function as it should (but other slideshows like on the home page work as they should without it).
Don't disable those whitelists unless you're really sure what you're doing. They are not there just for whitelisting ads or other junk, they are for working around issues that occur due to the blocking filters. Ad whitelisting is done in a separate subscription.
For me personally, that is exactly why I disable some whitelists. I use things like NoScript and ABP precisely to stop all the junk like blanket data mining and want things to stop working to alert me rather than automatically allowing everything as long as a site bundles that with the content and not allowing one without the other. Much prefer that than automatically blanket whitelisting things behind the scenes. Same reason I wouldn't want NoScript to allow every single script as long as that script might break some function if it didn't. Most every site is bundling legitimate scripts and data mining together deliberately to break sites so people and ABP will then create whitelists allowing it to run. I prefer to either choose to on my own personal basis or avoid sites altogether.

I find countless whitelists that would otherwise be allowed to for every instance or every instance on sites/pages that disabling does not harm my specific usage at all, for things I otherwise don't care about or might want under very specific circumstances that I can then allow when I wish. I could come up with hundreds that meet that criteria and only a couple that have been things, like this, that impacted my browsing and not understood what was the cause. And in this case, I vastly prefer that ads1.msads.net/library/dapmsn.js$domain=msn.com script being blocked at all times rather than allowing it at all times. I can easily do without that content, or sites that care more about bundling adware with legitimate content if forced to choose all or nothing (like I would if Flash didn't allow one to unselect bundled PUPs or when Soundforge/CNet etc turned to that model). I used to shop at and visit a site regularly until they required ajax.googleapis.com script to even see their ads. I have more money and time available now as I can easily live without these things.

Not to say I don't appreciate that heads up and I will attempt to learn from my mistake of being better aware when this issue arises again. I should have done a better job figuring out the two might go together instead of thinking one thing at a time. I tried NoScript allowing on those pages and looking at the ABP blockable items log for things being blocked or needed to be allowed but didn't think of it needing both at the same time for some reason (and likely wouldn't have wanted to allow those both all the time anyway so didn't considerate it).
You could download jquery from some other mirror site, such as ajax.aspnetcdn.com (Microsoft) (click the link I posted, don't try to go directly to the domain because that will just give you a not found page).
Here are the exact steps:
1) Download jQuery
2) Drag the downloaded file into the browser window, and copy the file: URL in the address bar
3) Go to about:config
4) Right-click, create string pref named "noscript.surrogate.jquery.replacement", for value, paste in the file: URL
5) Create string pref named "noscript.surrogate.jquery.sources", set it to, say

Code: Select all

^https?://.+/jquery.*\.js
(will make your downloaded jquery replace *all* blocked jquery; for a more specific variant to replace google jquery, see the other thread)
6) Test it: Go to a site with jquery loaded from google, then forbid googleapis. If it doesn't work, and if the file: URL has any spaces, replace each space with "%20" (without quotes) and try again.

Hope that helps
I appreciate the steps by steps. Sadly, I think I have to admit that I am still too stupid for that to seem as simple as it probably should and is. Hopefully, I will grasp it better over time. I wish I did as it sounds like one can accomplish some worthwhile things with the surrogates.

Maybe I will be back in a few months with a way to share some common surrogate scripts in some repository that can help restore functionality to some of them without their bundled adware. If I figure it out, there are probably more than a handful that could be useful that are commonly used but otherwise contain unneeded data mining junk in them as they are used by sites.

Thank you for all your time and help barbaz.
Mozilla/5.0 (Windows NT 6.2; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0
Post Reply