ok ok ok ok look I use DNS level ad blockers, I’m big in favor of them, but this is the dumbest shit ever.
Running client side JavaScript that detects when an advertisement failed to load and then popping a request to disable your ad blocker is in no way, shape, or form “spying”.
Don’t get me wrong, plenty of sites absolutely spy on you, and the ads themselves definitely spy on you.
But being able to detect that ads didn’t load? It’s completely client side and is not spying 😂
yep for websites that’s literally just checking if their ad element exists in the DOM tree.
const myAdElementSelector = "#fuckingAd";
const myAdElement = document.querySelector(myAdElementSelector);
if (!myAdElement) return "yes user is using adblocker";
simple as.
or maybe not honestly i don’t know i just wanted everyone to know i know javascript.
Even without JavaScript, back in my day doing some basic CSS stuff could effectively* do this too.
*Background showed if image doesn’t. Not hard to work around but did something if ad didn’t load.
There was better technique using CSS but I ran small band websites for basically free tickets so I wasn’t chasing riches. Just hosting cost. Single small ad was enough.
ok ok ok ok look I use DNS level ad blockers, I’m big in favor of them, but this is the dumbest shit ever.
Running client side JavaScript that detects when an advertisement failed to load and then popping a request to disable your ad blocker is in no way, shape, or form “spying”.
Don’t get me wrong, plenty of sites absolutely spy on you, and the ads themselves definitely spy on you.
But being able to detect that ads didn’t load? It’s completely client side and is not spying 😂
That last line is just real bad logic.
yep for websites that’s literally just checking if their ad element exists in the DOM tree.
simple as.
or maybe not honestly i don’t know i just wanted everyone to know i know javascript.
2/10, should have used jQuery
or maybe not honestly I don’t know I just wanted everyone to know I’m old enough to remember classic stackoverflow
You’re running software on my computer to check the state of the web page. That’s spying.
Even without JavaScript, back in my day doing some basic CSS stuff could effectively* do this too.
*Background showed if image doesn’t. Not hard to work around but did something if ad didn’t load.
There was better technique using CSS but I ran small band websites for basically free tickets so I wasn’t chasing riches. Just hosting cost. Single small ad was enough.
Tip for who wants to do it nowdays: use an SVG please…
Back in my day we did exact pixel measurements and compensated for IE6 breaking shit.