surrogate for scorecardresearch.com

Bug reports and enhancement requests
Dorus
Posts: 17
Joined: Mon Jun 23, 2014 10:46 pm

surrogate for scorecardresearch.com

Post by Dorus »

I'm not sure if this is the right place to ask, but anyway, i need a script surrogate, and i'm a completely noob at javascript, so some help would be nice.

Simply visiting a site that has scoredresearch as (i think) advertisement, gives a annoying 'popup' when javascript is disabled. Many dutch and belgium newspapers have this.

For example:
http://www.bndestem.nl/
http://www.gelderlander.nl/
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0
barbaz
Senior Member
Posts: 11109
Joined: Sat Aug 03, 2013 5:45 pm

Re: surrogate for scorecardresearch.com

Post by barbaz »

Do you use Adblock Plus or one of its forks?
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; OpenBSD amd64; rv:26.0) Gecko/20100101 Firefox/26.0 SeaMonkey/2.23
Dorus
Posts: 17
Joined: Mon Jun 23, 2014 10:46 pm

Re: surrogate for scorecardresearch.com

Post by Dorus »

no, i use no-script. I'm on the right forum i hope?
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0
barbaz
Senior Member
Posts: 11109
Joined: Sat Aug 03, 2013 5:45 pm

Re: surrogate for scorecardresearch.com

Post by barbaz »

Yeah, just that those things are a lot easier to zap with ABP. There is likely no global "catch-all" surrogate for zapping those. For your second link, try this

Code: Select all

for (let e of document.querySelectorAll('.dialog-no-script')){e.parentNode.removeChild(e);}
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; OpenBSD amd64; rv:26.0) Gecko/20100101 Firefox/26.0 SeaMonkey/2.23
barbaz
Senior Member
Posts: 11109
Joined: Sat Aug 03, 2013 5:45 pm

Re: surrogate for scorecardresearch.com

Post by barbaz »

Oh, forgot to add that the sources pref is

Code: Select all

!@.gelderlander.nl
Last edited by barbaz on Sat Aug 02, 2014 7:16 pm, edited 1 time in total.
Mozilla/5.0 (X11; OpenBSD amd64; rv:26.0) Gecko/20100101 Firefox/26.0 SeaMonkey/2.23
Dorus
Posts: 17
Joined: Mon Jun 23, 2014 10:46 pm

Re: surrogate for scorecardresearch.com

Post by Dorus »

Thanks, that's something at least. I was under the impression script surrogates worked for target domains, not per-site that include a certain domain. Like you don't need one for every website that uses google-analytics either.

Anyway, scoredresearch has been bothering me for some time now, as you have to allow it for a easy way to get rid of the lay-over, but looking at the WoT and google reputation for that site, it's spreading male ware quite frequent.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0
barbaz
Senior Member
Posts: 11109
Joined: Sat Aug 03, 2013 5:45 pm

Re: surrogate for scorecardresearch.com

Post by barbaz »

Dorus wrote:Thanks, that's something at least. I was under the impression script surrogates worked for target domains, not per-site that include a certain domain.
Actually it's both, depending the sources pref. Documentation here.
Dorus wrote:Anyway, scoredresearch has been bothering me for some time now, as you have to allow it for a easy way to get rid of the lay-over, but looking at the WoT and google reputation for that site, it's spreading male ware quite frequent.
Maybe play around with NoScript Options -> Trusted -> Show the NOSCRIPT... ?
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; OpenBSD amd64; rv:26.0) Gecko/20100101 Firefox/26.0 SeaMonkey/2.23
Dorus
Posts: 17
Joined: Mon Jun 23, 2014 10:46 pm

Re: surrogate for scorecardresearch.com

Post by Dorus »

barbaz wrote:
Dorus wrote:Anyway, scoredresearch has been bothering me for some time now, as you have to allow it for a easy way to get rid of the lay-over, but looking at the WoT and google reputation for that site, it's spreading male ware quite frequent.
Maybe play around with NoScript Options -> Trusted -> Show the NOSCRIPT... ?
No luck there.

Also, this surrogate fails when gelderlander.nl is allowed, but scorecardresearch.com is not, a situation i would prefer normally.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0
barbaz
Senior Member
Posts: 11109
Joined: Sat Aug 03, 2013 5:45 pm

Re: surrogate for scorecardresearch.com

Post by barbaz »

sources pref edited above
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; OpenBSD amd64; rv:26.0) Gecko/20100101 Firefox/26.0 SeaMonkey/2.23
Dorus
Posts: 17
Joined: Mon Jun 23, 2014 10:46 pm

Re: surrogate for scorecardresearch.com

Post by Dorus »

Both !@.gelderlander.nl and !.gelderlander.nl worked just fine as long as gelderlander.nl is blocked, but not when gelderlander.nl is allowed and b.scorecardresearch.com is still blocked.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0
barbaz
Senior Member
Posts: 11109
Joined: Sat Aug 03, 2013 5:45 pm

Re: surrogate for scorecardresearch.com

Post by barbaz »

Weird, with !@ and only gelderlander.nl allowed the massive overlay is gone here...
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; OpenBSD amd64; rv:26.0) Gecko/20100101 Firefox/26.0 SeaMonkey/2.23
Dorus
Posts: 17
Joined: Mon Jun 23, 2014 10:46 pm

Re: surrogate for scorecardresearch.com

Post by Dorus »

Perhapts it's one of the other pages i also allowed?
facebook.com
twitter.com
twimg.com
akamaihd.net
edit: nope, that's not it either.

Anyway, i have it working with:

Code: Select all

>.gelderlander.nl
Still hoping to find a way to run it for scorecardresearch.com instead.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0
barbaz
Senior Member
Posts: 11109
Joined: Sat Aug 03, 2013 5:45 pm

Re: surrogate for scorecardresearch.com

Post by barbaz »

Dorus wrote:Still hoping to find a way to run it for scorecardresearch.com instead.
Try this?

Code: Select all

if (window.location.hostname.endsWith(".gelderlander.nl") || window.location.hostname == "gelderlander.nl"){window.addEventListener("load", function(){for (let e of document.querySelectorAll('.dialog-no-script')){e.parentNode.removeChild(e);}}, false);}
sources:

Code: Select all

.scorecardresearch.com
Note that gelderlander.nl *must* be allowed for this to run.
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; OpenBSD amd64; rv:26.0) Gecko/20100101 Firefox/26.0 SeaMonkey/2.23
Dorus
Posts: 17
Joined: Mon Jun 23, 2014 10:46 pm

Re: surrogate for scorecardresearch.com

Post by Dorus »

That works like a charm :D Wonderfull.

I am thinking, what stops me from just using:

Code: Select all

window.addEventListener("load", function(){for (let e of document.querySelectorAll('.dialog-no-script')){e.parentNode.removeChild(e);}}, false);
A quick test shows this works on other websites also. I'm not expecting many problems since most websites dont include scoreresearch right?
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0
barbaz
Senior Member
Posts: 11109
Joined: Sat Aug 03, 2013 5:45 pm

Re: surrogate for scorecardresearch.com

Post by barbaz »

I included the domain check because it's possible other sites which include scripts from scorecardresearch might have elements with class "dialog-no-script" that you actually *want* to see. You can remove it if you want, but be ready for false positives.
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; OpenBSD amd64; rv:26.0) Gecko/20100101 Firefox/26.0 SeaMonkey/2.23
Post Reply