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 » Thu Nov 02, 2017 8:29 pm

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: 9442
Joined: Sat Aug 03, 2013 5:45 pm

Re: How to allow sites for a particular domain?

Post by barbaz » Thu Nov 02, 2017 8:31 pm

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 » Thu Nov 02, 2017 8:42 pm

>
> 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 » Thu Nov 02, 2017 8:59 pm

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 » Thu Nov 02, 2017 9:16 pm

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: 9442
Joined: Sat Aug 03, 2013 5:45 pm

Re: How to allow sites for a particular domain?

Post by barbaz » Thu Nov 02, 2017 9:36 pm

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 » Thu Nov 02, 2017 10:45 pm

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: 9442
Joined: Sat Aug 03, 2013 5:45 pm

Re: How to allow sites for a particular domain?

Post by barbaz » Thu Nov 02, 2017 10:53 pm

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 » Fri Nov 03, 2017 12:54 am

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: 9442
Joined: Sat Aug 03, 2013 5:45 pm

Re: How to allow sites for a particular domain?

Post by barbaz » Fri Nov 03, 2017 2:44 am

@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 » Fri Nov 03, 2017 4:32 am

... 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
Senior Member
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 » Sun Nov 05, 2017 10:19 pm

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