Page 1 of 1

Way to block a specific script from an allowed host?

Posted: Wed Feb 25, 2015 12:57 pm
by tarjk
Here is the script in question:
http://a248.e.akamai.net/www.crutchfiel ... alytics.js

The Crutchfield site will not work unless a248.e.akamai.net is allowed. But allowing akamai white lists the GoogleAnalytics script. If NoScript can allow akamai but still block this specific GoogleAnalytics script, I assume NoScript's surrogate will run and prevent any problems?

Can ABE provide this functionality? I've played around inputting this script into ABE in various ways. But nothing I've tried has produced the desired outcome.

Re: Way to block a specific script from an allowed host?

Posted: Wed Feb 25, 2015 8:50 pm
by barbaz
Does this work?

Code: Select all

Site ^https?://.*/GoogleAnalytics\.js
Deny
EDIT Oh, and no NoScript's GA surrogate won't run in place of that, unless you go to about:config and change the value of "noscript.surrogate.ga.sources" to

Code: Select all

*.google-analytics.com ^https?://.*/GoogleAnalytics\.js

Re: Way to block a specific script from an allowed host?

Posted: Thu Feb 26, 2015 1:30 am
by tarjk
barbaz wrote:Does this work?

Code: Select all

Site ^https?://.*/GoogleAnalytics\.js
Deny
EDIT Oh, and no NoScript's GA surrogate won't run in place of that, unless you go to about:config and change the value of "noscript.surrogate.ga.sources" to

Code: Select all

*.google-analytics.com ^https?://.*/GoogleAnalytics\.js
This did not work. But it was very helpful nonetheless. I am still trying to get the hang of regex. So I will continue to play with this and see if I can get it working.

Thanks!

Re: Way to block a specific script from an allowed host?

Posted: Thu Feb 26, 2015 4:05 am
by barbaz
tarjk wrote:I am still trying to get the hang of regex.
This tutorial may help you.