Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpages not blocking content from custom filters #2902

Closed
ryanbr opened this issue Aug 27, 2017 · 10 comments
Closed

Webpages not blocking content from custom filters #2902

ryanbr opened this issue Aug 27, 2017 · 10 comments

Comments

@ryanbr
Copy link
Contributor

ryanbr commented Aug 27, 2017

Describe the issue

Testing on 2 separate sites with 2 custom filters

https://www.theatlantic.com/

http://www.activistpost.com/

Using the following filters

@@||theatlantic.com^$generichidehide Doesn't seem to stop the generic elements from being used.

/mwx$image,domain=activistpost.com Doesn't seem to work on this site either (part of easylist already)

activ
atlantic

Your settings

[If you fail to provide this info, I will mark the issue as invalid. Lists all settings which differs from default settings]

  • OS/version: Windows 10 64bit
  • Browser/version: Firefox Nightly 57.0a1 (2017-08-25) (64-bit)
  • uBlock Origin version: 1.3.11rc0 webext
Your filter lists

Disabled uBlock filters, just enabled "My filters" and Easylist/Easprivacy etc.

@gorhill
Copy link
Owner

gorhill commented Aug 27, 2017

/mwx*$image,domain=activistpost.com works, see #1065.

@gorhill
Copy link
Owner

gorhill commented Aug 27, 2017

@@||theatlantic.com^$generichidehide is not a valid filter, you surely meant @@||theatlantic.com^$generichide.

@ryanbr
Copy link
Contributor Author

ryanbr commented Aug 27, 2017

Typo, but still issues.

atlantic2

/mwx*$image,domain=activistpost.com but as you see on activistpost.com, the filter isn't working (its not showing its being filtered in the logger and webpages shows the ads.

@quilloss
Copy link

Your image says https://www.theatlantic.com/world/ and /mwx$image,domain=activistpost.com.
/mwx*$image,domain=activistpost.com on http://www.activistpost.com/ works for me.

@shellye5
Copy link

@gorhill could this be related to this major bug? :

#2684 (comment)

@gorhill
Copy link
Owner

gorhill commented Aug 27, 2017

Both are working fine here. How many filters are reported as loaded from "My filters" list in "3rd-party filters" pane? Also, you still used /mwx$ instead of /mwx*$ above.

a

By the way, I sure hope you don't want to add /mwx*$... to EasyList, that is a majorly inefficient filter: it will have to be tried against all URLs since it can't be tokenized.

@ryanbr
Copy link
Contributor Author

ryanbr commented Aug 27, 2017

/mwx doesn't need a wildcard, its assumed by default due to ABP (unless a | ends the string). Sure not optimised, but it still follows basic regex rules and would be treated the same. Basically the wildcard is superfluous to requirements. (just to note, very few rules are like this)

I am really trying hard to test the extension again over ABP from a list author's perspective. The fact my custom filter additions aren't working do make me think twice in using uBo. I'll probably be using a pre-FF57 browser until things mature more down the road.

rules

@gorhill
Copy link
Owner

gorhill commented Aug 27, 2017

I'll probably be using a pre-FF57 browser until things mature more down the road.

uBO is mature.

@@||theatlantic.com^$generichide works just fine: all the reported selectors in the logger are found in EasyList and Fanboy Annoyance (which you did not disclose using in your opening comment). There is no generic selector applied to the page:

  • theatlantic.com###subscribe (Fanboy Annoyance)
  • theatlantic.com##.twitter (Fanboy Annoyance)
  • theatlantic.com##.sponsored (EasyList)
  • theatlantic.com##.nav-social-links (Fanboy Annoyance)
  • theatlantic.com##.facebook (Fanboy Annoyance)
  • theatlantic.com##.ad (EasyList)
  • theatlantic.com###footer-newsletter-signup (Fanboy Annoyance)
  • theatlantic.com###action-bar (Fanboy Annoyance)

You seems to be too eager to find uBO "wrong". How exactly did you come to the conclusion that @@||theatlantic.com^$generichide did not work?

If cases such as /mwx are rare as you say, then what is the issue of adding a * at the end? This will make the filter work for ABP and uBO. Anyways, it's unfortunate for users of EasyList to suffer such an inefficient filter just because there is no other way to fix the ad issue on activistpost.com for ABP specifically. This works for uBO, no inefficient filter required:

activistpost.com##script:inject(abort-current-inline-script.js, setTimeout, MBoxAdMain)

I am really trying hard to test the extension again over ABP from a list author's perspective.

I actually write the code for uBO and create filters to deal with all the cases seen in the wild, so I have both developer and list author perspectives, hence why I created all the extended syntax -- it makes the task of maintaining filter lists easier, and decrease the need to compromise block filters with exception filters to work around anti-blockers:

a

It's your call to make your life easier by using the extended syntax.

@quilloss
Copy link

activistpost.com##script:inject(abort-current-inline-script.js, setTimeout, MBoxAdMain)
Is there a way to specify multiple domains for script injection?
The easylist filters for /mwx has around 3kB of domains to specify.

@mapx-
Copy link

mapx- commented Aug 27, 2017

take a look to ublock filters, for example:
oload.tv,openload.co,streamango.com##script:inject(openload.co.js)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants