-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
"Block similar elements" option in the "Block Element" dialog #933
Comments
Where can I see that |
Hi, @gorhill! You need to create an account on inoreader.com and subscribe to some feed there. The feeds should be set to be displayed as columns. uBlock will block the ads but will leave gaps above and between the feed items, where it was supposed to appear ads: |
I have noticed today that the website quora.com also uses this same method of random strings, which seems to have been designed to fool adblockers. If you start browsing questions there, they will eventually display an annoying popup trying to force you to login to display more questions. |
URL? (always) |
Oh, sorry! I'll just give one example of an URL on quora.com: https://www.quora.com/Why-do-people-answer-questions-on-Quora-1 You won't see the annoying login message right away, but from there, if you start browsing through related questions, it appears after around three or five pages: |
It's just a matter of removing the variable part using a fancier CSS selector in the current instance:
This specific case wouldn't be solved with a "Block similar elements" feature, as the variable part is in the unique id of the DOM element. |
I have just opened Adguard, and "Block similar elements" gives me |
This was fixed with 1c4347d, I hadn't realized there was an issue opened about this. Ctrl-click will now pick better broad selectors. |
That's awesome, thank you! |
what is the equivalent on OSX? I tried ctrl, option, cmd, shift to no avail |
In uBlock there is already the "Block Element" tool, but there is one feature of Adguard that makes me switch to it constantly to write new filters, which is called "Block similar elements".
As an example, on Inoreader.com, uBlock blocks ads, but leaves empty spaces between feed items (the cosmetic filters don't work there).
Using uBlock, I select the empty space, and it returns the element
###leaderboard_ad-564435f7bb14f
to block. The problem with this approach is that564435f7bb14f
here is just a random string, which changes every time I visit Inoreader.To block ads like this effectively, I have to activate Adguard, open the "Block Element" dialog, select that element, which will return
###leaderboard_ad-564435f7bb14f
too. But then I click on "Advanced settings" and then "Block similar elements", which gives meinoreader.com##.block_article_ad, .mobile_leaderboard_ad, .ad_size_mobile_leaderboard, .sinner
instead. I have used this rule in uBlock and it always works!I have seen some very annoying ads on some other websites which also use that random string approach, and I can only write the rules easily for them with Adguard, and then I import them to uBlock.
The text was updated successfully, but these errors were encountered: