this post was submitted on 25 Oct 2023
1944 points (99.0% liked)

me_irl

5237 readers
1 users here now

Selfies for the soul.

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Aria@lemmygrad.ml 4 points 1 year ago (2 children)

Adblock users optimise their adblockers to be invisible to adblock-checking code. If your site works well, and is worth visiting, the only change in behaviour you can inspire is people nerfing their own adblockers.

[–] araozu@lemm.ee 2 points 1 year ago (1 children)

Do they? I remember not long ago I just had to have an ads.js file, and if the user had an adblocker this file wouldn't load.

So I just had a

var ads_enabled = true;

And I could check if the user had an adblock.

I think most people just install ublock/others and leave it default. When I tried to customize ublock all those lists and regex pushed me away, never tried again since.

[–] Phen@lemmy.eco.br 1 points 1 year ago

Ads can mean many things. It could be short for something (for example Active Directory Settings). I remember getting something legitimate blocked like 10 years ago but nothing in recent years so I imagine the detection got better at dealing with that.

[–] Venomnik0@lemm.ee 1 points 1 year ago (2 children)

how is that possible because I'd like to know how to do that in general?

[–] Aria@lemmygrad.ml 3 points 1 year ago

Step one is you don't refuse files from the server, and try to answer as if you have them when asked in js. But the current actual methods and arms race is happening by comparing computed results, how your page is rendered according to your own browser when probed, vs how the detection code expects it rendered. Adblockers do things like lie, or inject things that can look close enough to ads that you pass the tests. You can see how detection works and try to sidestep what it does by looking at libraries like these https://github.com/sitexw/FuckAdBlock

This one in particular will probably just not run in uBlock out of the box so this one's pretty easy to sidestep. But you can stuff code like this obscured in your site and another piece of code that checks that it hasn't been removed. It's pretty difficult for website develops to win this fight, since ultimately they're letting us download and render their pages with fairly transparent technology.

[–] Honytawk@lemmy.zip 1 points 1 year ago

In uBlock Origin, you can add filters.

Either those you download from the internet, or you can go add items yourself by clicking the uBlock Origin icon and selecting the "item picker".

Then just click on the item you want to block.

There are more advanced ways to block stuff, like based upon content. I used this to block all the "suggested for you" posts on Facebook.