How to allow sites for a particular domain?

Ask for help about NoScript, no registration needed to post
jimoe
Posts: 18
Joined: Wed Aug 18, 2010 9:04 pm

How to allow sites for a particular domain?

Post by jimoe »

linux v4.4.92-31-default x86_64
noscript 5.1.4
firefox 55.0.3

A recent trend of sites that offer free access is to insist that ads be allowed (TANSTAAFL). A message/window/popup informs the user that whatever is blocking ads must be disabled before content may be viewed. Fair enough.

Is there a way to allow such ad sites to NoScript on a per-domain basis rather than all or nothing?
Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: How to allow sites for a particular domain?

Post by barbaz »

https://noscript.net/faq#qa8_10
or wait for noscript 10
*Always* check the changelogs BEFORE updating that important software!
-
jimoe
Posts: 18
Joined: Wed Aug 18, 2010 9:04 pm

Re: How to allow sites for a particular domain?

Post by jimoe »

>
> https://noscript.net/faq#qa8_10
>
Okay, thank you.

> or wait for noscript 10
>
Since the current version is 5.x, that may be a bit of a wait?
Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0
jimoe
Posts: 18
Joined: Wed Aug 18, 2010 9:04 pm

Re: How to allow sites for a particular domain?

Post by jimoe »

I added the following ruleset ...

Code: Select all

#
site tucson.com
accept from e0mn.com
deny
... and received the error message "line 2:0 missing EOF at 'site'".

What is an EOF? (I doubt it is end-of-file.) How do I add it?

I looked at the ABE spec (pdf). "EOF" appears once without explanation.
Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0
jimoe
Posts: 18
Joined: Wed Aug 18, 2010 9:04 pm

Re: How to allow sites for a particular domain?

Post by jimoe »

The issue is that the keywords are case-sensitive.
The error-free version:

Code: Select all

Site https://tucson.com
Accept from e0mn.com
Deny
Sadly, it does not work. When I manually (temporarily) allow <e0mn.com>, the site loads; otherwise, it is denied.
Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: How to allow sites for a particular domain?

Post by barbaz »

jimoe wrote:Since the current version is 5.x, that may be a bit of a wait?
Don't know. NoScript 10 is the pure WebExtension version of NoScript, which is due out before November 14. I don't know how much longer than that it would take for new features.
jimoe wrote:The issue is that the keywords are case-sensitive.
The error-free version:

Code: Select all

Site https://tucson.com
Accept from e0mn.com
Deny
Sadly, it does not work. When I manually (temporarily) allow <e0mn.com>, the site loads; otherwise, it is denied.
That ABE rule says you want to allow https://tucson.com only when visiting e0mn.com (not a subdomain of e0mn.com). It doesn't take subdomains of either site into account. You probably want to change it like this -

Code: Select all

Site .tucson.com
Accept from .tucson.com .e0mn.com
Deny
Notice the leading dots, which mean "this domain and all its subdomains". Now your ABE rule restricts all of tucson.com to loading only from any of tucson.com or e0mn.com.

Does this help?
*Always* check the changelogs BEFORE updating that important software!
-
jimoe
Posts: 18
Joined: Wed Aug 18, 2010 9:04 pm

Re: How to allow sites for a particular domain?

Post by jimoe »

barbaz wrote:That ABE rule says you want to allow https://tucson.com only when visiting e0mn.com (not a subdomain of e0mn.com). It doesn't take subdomains of either site into account. You probably want to change it like this -

Code: Select all

Site .tucson.com
Accept from .tucson.com .e0mn.com
Deny
Notice the leading dots, which mean "this domain and all its subdomains". Now your ABE rule restricts all of tucson.com to loading only from any of tucson.com or e0mn.com.

Does this help?
No. I also note that <e0mn.com> is still listed as blocked in the NoScript panel.

Code: Select all

# Allow ad site(s) For AZ Daily Star
Site .tucson.com
Accept from .tucson.com .e0mn.com
Deny
Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: How to allow sites for a particular domain?

Post by barbaz »

Oh, a search for "AZ Daily Star" explains it. Your ABE rule is backwards. Try this -

Code: Select all

# Allow ad site(s) For AZ Daily Star
Site .e0mn.com
Accept from .tucson.com .e0mn.com
Deny
jimoe wrote:I also note that <e0mn.com> is still listed as blocked in the NoScript panel.
You have to Allow it in the script blocking. ABE and script blocking are totally independent, the status of one does not indicate the status of the other.
*Always* check the changelogs BEFORE updating that important software!
-
jimoe
Posts: 18
Joined: Wed Aug 18, 2010 9:04 pm

Re: How to allow sites for a particular domain?

Post by jimoe »

barbaz wrote:Oh, a search for "AZ Daily Star" explains it. Your ABE rule is backwards. Try this -

Code: Select all

# Allow ad site(s) For AZ Daily Star
Site .e0mn.com
Accept from .tucson.com .e0mn.com
Deny
Argh! That did not work either.
You have to Allow it in the script blocking. ABE and script blocking are totally independent, the status of one does not indicate the status of the other.
I am confused. If I allow <e0mn.com> in script blocking, what would be the point of ABE? Or does ABE follow script blocking and restrict it to <tucson.com>?
Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: How to allow sites for a particular domain?

Post by barbaz »

@jimoe Remember to log in before posting so that you don't have to solve the CAPTCHA every time. (I've fixed your last two posts)
jimoe wrote:
barbaz wrote:Oh, a search for "AZ Daily Star" explains it. Your ABE rule is backwards. Try this -

Code: Select all

# Allow ad site(s) For AZ Daily Star
Site .e0mn.com
Accept from .tucson.com .e0mn.com
Deny
Argh! That did not work either.
In what way did it not work?
jimoe wrote:I am confused. If I allow <e0mn.com> in script blocking, what would be the point of ABE? Or does ABE follow script blocking and restrict it to <tucson.com>?
Think of it this way. Imagine you're driving down the road in a town. Ahead of you is a traffic light. Further ahead is a train crossing. Beyond that is where you want to go. If the traffic light is red, you can't get across. If there is a train, you can't get across. The traffic light does not determine the presence of a train. Nor does the presence of a train determine what color the traffic light will be. But unless both the light is green and there is no train, you can't get across. See? :)
*Always* check the changelogs BEFORE updating that important software!
-
jimoe
Posts: 18
Joined: Wed Aug 18, 2010 9:04 pm

Re: How to allow sites for a particular domain?

Post by jimoe »

... Ahead of you is a traffic light. Further ahead is a train crossing. ...
The "traffic light" is script blocking, and the "train crossing" is ABE. Got it.
Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: How to allow sites for a particular domain?

Post by Thrawn »

Or you can think of them as separate locks on a door, one needing a key and the other needing a combination. Both need to be unlocked to open it.
======
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
Post Reply