How to block ads with a random code

Everything about using Adblock Plus on Opera
Post Reply
Lucas1298
Posts: 5
Joined: Fri Aug 04, 2023 10:48 pm

How to block ads with a random code

Post by Lucas1298 »

A site has ads with this (when I select block element):

##.inner > .f0d6a84dd30afb718ccd9af051546f68

The long number changes every time. How do I block this?
Lucas1298
Posts: 5
Joined: Fri Aug 04, 2023 10:48 pm

Re: How to block ads with a random code

Post by Lucas1298 »

Hey canseo! Stop replying then deleting, you wasted my time.
divineeye
Posts: 2
Joined: Fri Aug 18, 2023 8:59 am

Re: How to block ads with a random code

Post by divineeye »

Blocking ads with random code may not be an effective or reliable method. Ad-blocking typically involves using dedicated ad-blocking software or browser extensions designed for this purpose. These tools are developed and maintained to specifically block ads while ensuring that websites and web applications continue to function correctly. Writing random code to block ads could lead to unintended consequences, such as breaking websites or causing other issues.

Here's how you can block ads using legitimate and effective methods:

1. Ad-Blocker Browser Extensions:
- Install a reputable ad blocker browser extension. Some popular ones include:
- uBlock Origin: Available for various browsers, uBlock Origin is highly efficient and customizable.
- Adblock Plus: A widely used extension known for its user-friendly interface and customizable filters.
- AdGuard: A comprehensive ad blocker that also provides privacy and security features.

2. Built-In Browser Settings:
- Most modern web browsers have built-in settings to block pop-ups and potentially harmful or intrusive content. You can access these settings in your browser's preferences or settings menu.

3. Hosts File Modification:
- On Windows, macOS, or Linux, you can modify the hosts file to block ads. This method requires some technical knowledge.
- Add entries to the hosts file to redirect ad-serving domains to localhost or a non-existent IP address.

4. DNS-Based Ad Blocking:
- Some DNS services and routers offer ad-blocking features. By configuring your DNS settings to use a DNS service that blocks ads, you can block ads at the network level.

5. Pi-hole:
- Pi-hole is a network-wide ad blocker that can be installed on a Raspberry Pi or a dedicated server. It blocks ads for all devices on your network.

6. Mobile Ad Blockers:
- For mobile devices, you can install ad-blocking apps or browsers with built-in ad-blocking features.

Remember that while blocking ads can enhance your browsing experience, it can also impact the revenue of content creators and websites that rely on advertising for support. You may want to consider whitelisting websites you trust to support their content while still blocking ads on less reputable sites.

Additionally, always ensure that you are using legitimate and trustworthy ad-blocking solutions to avoid potential security risks associated with using random or unverified code.
Lucas1298
Posts: 5
Joined: Fri Aug 04, 2023 10:48 pm

Re: How to block ads with a random code

Post by Lucas1298 »

I think you've misunderstood. I don't want to use a random code to block the ad. It's the ad which uses a random code. I already use adblock, adblock plus, and ublock origin, but none can recognise that ad, since the next time it's there, it's a different random code. I can't tell any of them to block the ad, since it doesn't recognise it next time.

The ad looks like this when I select to block element in an adblocker:
##.inner > .f0d6a84dd30afb718ccd9af051546f68

In Opera if I examine it it looks like:
<div class="ec29503e2c9c3e8950540286a69722ac" style="display: block; text-align: center; font-weight: bold; font-size: 2em; background-color: rgb(255, 0, 0); color: rgb(255, 255, 255); border-radius: 5px; margin: 50px 10px 10px; padding: 10px; cursor: pointer;">BOINCstats is made possible by displaying ads.<br>Please consider supporting us by adding us to your whitelist or make a small donation.</div>

I tried adding "BOINCstats is made possible by displaying ads" by manually editing block element in adblock plus (the other two blockers refused to let me edit), but it had no effect.

Perhaps I can manually edit a filter, but I don't understand the syntax used in there.
rootbeer
Posts: 10
Joined: Tue Sep 05, 2023 5:21 pm

Re: How to block ads with a random code

Post by rootbeer »

Lucas1298 wrote: Mon Sep 04, 2023 6:51 pm I already use adblock, adblock plus, and ublock origin
I hope not at the same time, on the same browser -- Adblock Plus / AdBlock have common ownership and the same default filter lists
Lucas1298 wrote: Mon Sep 04, 2023 6:51 pm but none can recognise that ad
post here / in the Lanik forum / in r/uBlockOrigin the URL and your browser


among a random class there can be different identifying elements, such as "[banner]"
Lucas1298
Posts: 5
Joined: Fri Aug 04, 2023 10:48 pm

Re: How to block ads with a random code

Post by Lucas1298 »

rootbeer wrote: Tue Sep 05, 2023 7:54 pm
Lucas1298 wrote: Mon Sep 04, 2023 6:51 pm I already use adblock, adblock plus, and ublock origin
I hope not at the same time, on the same browser -- Adblock Plus / AdBlock have common ownership and the same default filter lists
Yes, I use them all at once, I thought one might find some things and the other might find others. Which is better?

And if they're made by the same people, why do they make two?
rootbeer wrote: Tue Sep 05, 2023 7:54 pm
Lucas1298 wrote: Mon Sep 04, 2023 6:51 pm but none can recognise that ad
post here / in the Lanik forum / in r/uBlockOrigin the URL and your browser
Opera.

https://www.boincstats.com/stats/-1/use ... rojectList

In particular the bright red banner saying "BOINCstats is made possible by displaying ads. Please consider supporting us by adding us to your whitelist or make a small donation."
rootbeer wrote: Tue Sep 05, 2023 7:54 pmamong a random class there can be different identifying elements, such as "[banner]"
Adblock only detects the random number part:

<DIV class="a318aae76cd42e6426fbcd603ed7bb77">

But Opera sees more:

<div class="a318aae76cd42e6426fbcd603ed7bb77" style="display: block; text-align: center; font-weight: bold; font-size: 2em; background-color: rgb(255, 0, 0); color: rgb(255, 255, 255); border-radius: 5px; margin: 50px 10px 10px; padding: 10px; cursor: pointer;">BOINCstats is made possible by displaying ads.<br>Please consider supporting us by adding us to your whitelist or make a small donation.</div>

But I don't know how to get adblock to filter on the text "Please consider supporting us" as it doesn't see it.
rootbeer
Posts: 10
Joined: Tue Sep 05, 2023 5:21 pm

Re: How to block ads with a random code

Post by rootbeer »

Lucas1298 wrote: Mon Sep 04, 2023 6:51 pm Which is better?
uBlock Origin doesn't allow ads purposefully and addresses anti-adblock mechanisms by default; it's all up to preference
Lucas1298 wrote: Mon Sep 04, 2023 6:51 pm And if they're made by the same people, why do they make two?
Eyeo bought AdBlock, Inc. (formerly BetaFish, Inc.) in 2021.
I'd say it just makes sense to maintain both since they are very known brands.
Lucas1298 wrote: Mon Sep 04, 2023 6:51 pm Opera.

https://www.boincstats.com/stats/-1/use ... rojectList

In particular the bright red banner saying "BOINCstats is made possible by displaying ads. Please consider supporting us by adding us to your whitelist or make a small donation."
disable Opera's built-in ad and tracker blocker if you haven't already, and test without AdBlock and Adblock Plus on that webpage -- no anti-adblock with just uBlock Origin on my side

or add

Code: Select all

boincstats.com#?#[style*="rgb(255, 255, 255);"]:-abp-contains(is made possible by displaying ads)
Lucas1298
Posts: 5
Joined: Fri Aug 04, 2023 10:48 pm

Re: How to block ads with a random code

Post by Lucas1298 »

Thanks! I disabled adblock, adblock plus, and Opera's blocker, and the page no longer detects I'm blocking. I'll stick with Ublock Origin.
Pranav
Posts: 1
Joined: Fri Dec 15, 2023 11:46 am

Re: How to block ads with a random code

Post by Pranav »

I don't know, How to block ads with a random code?Please anyone help me?
Post Reply