Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a "no ad blocker detected script" #9

Open
hdkw opened this issue Jan 21, 2017 · 2 comments
Open

Create a "no ad blocker detected script" #9

hdkw opened this issue Jan 21, 2017 · 2 comments

Comments

@hdkw
Copy link

hdkw commented Jan 21, 2017

Hi thank you so much for your work! I think the problem of advertising is totally underestimated and your initiative is important.
It would be great to have something that independent websites could use to assert their difference and attack sites that sell their users:
a script that would mirror the ad blocker detection of corporate sites only to show a message when the user is NOT using an ad blocker. Something like what you are already doing : "we detected that you are not using an ad blocker!"..

I'm don't know much about html but basically my question is : is it possible to change a bit your work to include it on a website so that nothing happens when adblocking is on and a message appears to suggest using an ad blocker when adblocking is off?

@fivefilters
Copy link
Owner

fivefilters commented Jan 24, 2017

Thank you for the kind words. :)

It is possible to do this. In fact, we do it on FiveFilters.org. If a visitor to our site does not have ad blocking enabled, they will see a link in the top navigation to our Block Ads! site. If they do, that link will not display.

We've been meaning to make a simple cut and paste HTML snippet for this purpose. For the time being you can use what's posted here: https://forums.lanik.us/viewtopic.php?f=85&t=30824 Inserting the CSS block and HTML block in your site should do the job. Although we generally do not recommend Adblock Plus. So I would change the URL and link text to either point to uBlock Origin or our Block Ads! site (uBlock Origin does not yet have a nice home page to tell the user which version of their application they need to install).

When I get some time, I will try and do a version based on this to promote uBlock Origin instead and I'll post it here.

If you're curious about how this works, the key part of the method above is the inclusion of the class attribute value "GoogleAd":

<div class="abp-box abp-msg GoogleAd">Install...

Ad blockers that rely on Easy List (e.g. AdBlock Plus, uBlock Origin and many others) will see that as a sign that what it holds is an ad, and so they won't show it. Users who don't have an ad blocker will see the contents, which in this case is not an ad, but a message to install an ad blocker.

@hdkw
Copy link
Author

hdkw commented Jan 26, 2017

Thanks for your answer, this is great and I'm looking forward for your snippet. How can I contact you privately by the way ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants