[RESOLVED] Can allow javascripts per URL instead per site?

Ask for help about NoScript, no registration needed to post
NoscriptPerURL

[RESOLVED] Can allow javascripts per URL instead per site?

Post 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.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
barbaz
Senior Member
Posts: 11141
Joined: Sat Aug 03, 2013 5:45 pm

Re: Can allow javascripts per URL instead per site?

Post 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
*Always* check the changelogs BEFORE updating that important software!
-
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: Can allow javascripts per URL instead per site?

Post 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.
======
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:45.0) Gecko/20100101 Firefox/45.0
barbaz
Senior Member
Posts: 11141
Joined: Sat Aug 03, 2013 5:45 pm

Re: Can allow javascripts per URL instead per site?

Post 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. :)
*Always* check the changelogs BEFORE updating that important software!
-
NoscriptPerURL

Re: Can allow javascripts per URL instead per site?

Post 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)
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
barbaz
Senior Member
Posts: 11141
Joined: Sat Aug 03, 2013 5:45 pm

Re: Can allow javascripts per URL instead per site?

Post by barbaz »

You're welcome! Image

(Did you mean ABE?)
*Always* check the changelogs BEFORE updating that important software!
-
Post Reply