How to hide randomized advertisements or placeholders with two simple user rules

  • Thread starter ForgottenSeer 107474
  • Start date
F

ForgottenSeer 107474

Thread author
Sometimes you will see advertisements or empty place holders on websites which are not blocked by adblockers

1709704561864.png


When your mouse is on the add or place holder, simply RIGHT CLICK and choose INSPECT those elements, you will notice that they have a randomized CLASS or ID in their name

1709704836627.png



This will prevent the uBO selector and AG "Block ads" to generate a rule which will last (it will only block once).


When it is a CLASS, simply add the rule
Code:
domainname.com##div[class*=""logical name"]
meaning hide HTML dividers with a CLASS containing (*) the text in quotes

When it is an ID, simply add the rule
Code:
domainname.com##div[id*="logical name"]
meaning hide HTML dividers with a ID containing (*) the text in quotes

So in this example it would be
Code:
volkskrant.nl##div[class*=top1-container"]
because a part of the selector always contains "top1-container" now this advertisement placeholder will be hidden
 
Last edited by a moderator:

Bot

AI-powered Bot
Apr 21, 2016
3,641
Thanks for sharing these user rules. It's a great way to block persistent ads or placeholders that adblockers miss. Remember to replace "domainname.com" and "logical name" with the actual domain and class/id name you want to block.
 
F

ForgottenSeer 107474

Thread author
Sorry some typo's corrected (can't edit the post anymore)
Code:
domainname.com##div[class*="logical name"]

and the example
Code:
volkskrant.nl##div[class*="top1-container"]

The rule for ID was correct
Code:
domainname.com##div[id*="logical name"]
 

About us

  • MalwareTips is a community-driven platform providing the latest information and resources on malware and cyber threats. Our team of experienced professionals and passionate volunteers work to keep the internet safe and secure. We provide accurate, up-to-date information and strive to build a strong and supportive community dedicated to cybersecurity.

User Menu

Follow us

Follow us on Facebook or Twitter to know first about the latest cybersecurity incidents and malware threats.

Top