Page 1 of 1

Allow JS from a certain host only on one domain

Posted: Thu Nov 02, 2017 9:07 pm
by jcarpenter2
When I click "Allow" to allow JS from a certain host, it runs on all domains that pull JS from that host, refreshing all affected tabs. That is not how I wish to whitelist scripts. I would like to whitelist them by js host + domain. How can I do that?

For instance, suppose there are two websites:

http://foo.com
http://bar.com

that both include JS that is served from

http://jshost.com

Currently I cannot allow foo.com to run JS from jshost.com while not allowing bar.com to do the same. I wish to whitelist jshost.com twice: once for foo.com and once for bar.com.

EDIT:
Just found this https://noscript.net/faq#qa8_10

Which is nice, but the Options window described there steals focus from Firefox, so I cannot have it open while browsing. There needs to be a separate file that I can have off to the side and edit, or a GUI button to press that says "Allow this script for this site only".

Re: Allow JS from a certain host only on one domain

Posted: Thu Nov 02, 2017 9:40 pm
by barbaz
NoScript does not have such feature (yet?). I suggest you install µMatrix alongside NoScript, and set your per-site permissions in µMatrix.

Re: Allow JS from a certain host only on one domain

Posted: Thu Nov 02, 2017 10:05 pm
by jcarpenter2
Thanks for the tip! uMatrix seems to be the good sauce.

Re: Allow JS from a certain host only on one domain

Posted: Thu Nov 02, 2017 10:38 pm
by GµårÐïåñ
Sure it does, think ABE.

Re: Allow JS from a certain host only on one domain

Posted: Thu Nov 02, 2017 11:10 pm
by barbaz
GµårÐïåñ wrote:Sure it does, think ABE.
Yeah, but the OP asked for a GUI -
jcarpenter2 wrote:EDIT:
Just found this https://noscript.net/faq#qa8_10

Which is nice, but the Options window described there steals focus from Firefox, so I cannot have it open while browsing. There needs to be a separate file that I can have off to the side and edit, or a GUI button to press that says "Allow this script for this site only".

Re: Allow JS from a certain host only on one domain

Posted: Thu Nov 02, 2017 11:57 pm
by GµårÐïåñ
barbaz wrote:Yeah, but the OP asked for a GUI -
ABE can be accessed through the GUI and is there for exactly this kind of pick and choose customization. Many years ago, you can ask Thrawn, we worked on a GUI driven ABE decisions but quickly became obvious that one size wizarding doesn't fit all and it is best to be done with thoughtfulness and intention instead to understand what is happening. While uMatrix's menu driven style might seem like the solution, it has its own limitation and considerations that involve modifying the rules by hand, effectively no different than doing it with ABE. To each their own.

Re: Allow JS from a certain host only on one domain

Posted: Fri Nov 03, 2017 1:46 am
by Thrawn
I actually decided that uMatrix does 90+% of what I would want an ABE frontend to do, except better than I would build, so I stopped development.

Re: Allow JS from a certain host only on one domain

Posted: Fri Nov 03, 2017 9:37 pm
by GµårÐïåñ
There you have it. :ugeek:
Keep in mind that uMatrix is an extension of uBlock in the sense that it is more of a general blocker of resources than JUST scripts, much like how most of use have and used ReqeustPolicy in conjunction with NoScript to introduce a ACL or Firewall style rule to control dynamic traffic. In fact uMatrix was born of that, much like ABE was, and not to replicate NoScript functionality. Any cross over is simply the nature of manipulating network traffic, much like NS will break ads but it is not an adblocker.