jQuery Tutorials: Detect AdBlock

preview_player
Показать описание

Official site

Twitter
Рекомендации по теме
Комментарии
Автор

Alex has the right idea: Don't force users to not use AdBlock. 9 times out of them you'll just make them mad. However if you just ask them it's possible that they'll Whitelist your page/s from AdBlock (given that your ads are not intrusive).

Good tutorial man. Didn't know this. :)

MeeperMogle
Автор

Really interesting concept. I don't normally use jQuery or js in general (more of a server-side guy) but I see how this would be useful. Gonna fav this for later usage

Gwe_youtube
Автор

It's only a matter of time until the maker of AdBlock realises this and adds the patch.
It's a good thing I don't use it.

Great tutorial! Hopefully it can last forever ;P

MarcusTechKat
Автор

You can create a div that covers up the page (has a height and width off 100%, left and top of 0, and a position of fixed with CSS) in a HTML noscript tag. If a user who has disabled JavaScript goes to your website, he/she can't see anything but the div. (People can however delete the div in the 'Inspect element' option of the browser, but I don't think people want to do it on every page).
It's kind of a harsh method, but you do could this if your site really depends on JavaScript.

Remi
Автор

MUCH SIMPLER: Create a javascript that makes everything on your page disappear or show up a display box (saying they must turn off AdBlock for example), and set it to true by default where you make it turned off if a script in ads.js (let's say there's a variable with a false value). AdBlock won't include ads.js on that page, so you may do whatever you want in the default script for adblockers.

Kidel
Автор

It's like building a weapon against what you're doing yourself too :)

imfasa
Автор

You could run a javascript that replaces your request of disabling the addons with the ad. Not sure if it would work, as I have never tried it

Gwe_youtube
Автор

That's why I whitelist pages with my noscript to enable javascript :)

manutdfan
Автор

So if you have detected adblock with javascript, could you not overwrite the height again with a piece of js? Or does adblock completely remove the advertisement?

MittaSpitta
Автор

seriusly answer me, Will you do a page where every member shows up, a avatar picture upload, and a like facebook test post, so you can post about your day?

idowedo
Автор

They do? Well I guess they've updated it to check continuously for scripts like this which works with variables, but that is kind of hard to bypass.

Kidel
Автор

if you have again a vode like this you blured you can also paste it in a other page en include it with php

RemcoRemco
Автор

And sorry for my bad English, I didn't have the space anymore to type that in the first comment.

Remi
Автор

But if user have disabled the javascript from browser?

whitedragon
Автор

Only 90%?
I'm sure its higher than that

burnsy
Автор

The only bad thing is if the block that .js file. Then this is useless. I'm working on a script that will be free to the public that will prevent ad blocker to block anti-adblockers and also prevent users from using the noscript. If your interested send me a reply to this comment and I will rush it.

meade
welcome to shbcf.ru