Page 1 of 1
[RESOLVED] Can allow javascripts per URL instead per site?
Posted: Mon Feb 06, 2017 3:05 pm
by NoscriptPerURL
For example, can I allow "google.com" only when I access to "
https://www.reddit.com/login"?
I don't want to allow google.com when I access to any URLs except the URL "
https://www.reddit.com/login".
If I allow "google.com" at once, also I must allow it when I access any URLs.
Re: Can allow javascripts per URL instead per site?
Posted: Mon Feb 06, 2017 6:27 pm
by barbaz
Yes, but there is no security advantage. In security, either you trust a site or you don't. Why? -
1) The javascripts are the javascripts (in this case google.com) whether called by 'goodsite.net' or 'rawr-im-evil.net'.
2) All the URLs on a site (in this case reddit) are controlled by the same entity.
That said, yes per-URL permissions is possible -
FAQ 8.10
Re: Can allow javascripts per URL instead per site?
Posted: Tue Feb 07, 2017 3:43 am
by Thrawn
And if your reasons for blocking Google are privacy-related (which is fine), then your best option is probably to investigate the many ad-blockers that exist. They're much better suited to the task of selectively blocking domains, and as a bonus, you'll be able to prevent many more kinds of tracking than just Google.
Re: Can allow javascripts per URL instead per site?
Posted: Tue Feb 07, 2017 4:53 am
by barbaz
I've done per-URL permissions before, and my reason is closer to annoyance removal than anything else. I just find a site's scriptless version easier to work with on some URLs, but need their scripts on other URLs.
So if the OP does not have a misconception, I would suspect something along these lines - reddit performing like a snail with google.com Allowed, but google.com required for the login page to work.
I'm not sure if an ad blocker type addon would be fine-grained enough for this. The
ABP syntax, which most blockers use, only supports restricting filters' effect by domain. Even the
uBlock Origin syntax doesn't have a 'limit this filter to only this path' option.
Fortunately, ABE works well here.

Re: Can allow javascripts per URL instead per site?
Posted: Tue Feb 07, 2017 10:23 am
by NoscriptPerURL
Thank you very much barbaz.
I found what I wanted, ABP!
Code: Select all
Site .google.com .gstatic.com
Accept from https://www.reddit.com/login .google.com
Deny INCLUSION(SCRIPT, OBJ, SUBDOC)
Re: Can allow javascripts per URL instead per site?
Posted: Tue Feb 07, 2017 5:30 pm
by barbaz
You're welcome!
(Did you mean AB
E?)