Allow JS from a certain host only on one domain

Ask for help about NoScript, no registration needed to post
jcarpenter2
Posts: 2
Joined: Thu Nov 02, 2017 9:01 pm

Allow JS from a certain host only on one domain

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

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

Post by barbaz »

NoScript does not have such feature (yet?). I suggest you install µMatrix alongside NoScript, and set your per-site permissions in µMatrix.
*Always* check the changelogs BEFORE updating that important software!
-
jcarpenter2
Posts: 2
Joined: Thu Nov 02, 2017 9:01 pm

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

Post by jcarpenter2 »

Thanks for the tip! uMatrix seems to be the good sauce.
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3365
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

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

Post by GµårÐïåñ »

Sure it does, think ABE.
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0
barbaz
Senior Member
Posts: 10847
Joined: Sat Aug 03, 2013 5:45 pm

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

Post 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".
*Always* check the changelogs BEFORE updating that important software!
-
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3365
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

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

Post 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.
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

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

Post 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.
======
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
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3365
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

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

Post 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.
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0
Post Reply