Block Users That Come With Adblock

Status
Not open for further replies.

Jesse

Active Member
6,218
2009
2,026
320
(Just added the code to imgah to show you. I did not add the 2nd part to block users http://www.imgah.com)

This all goes within the <head> tags


This first part here will simple post a message in the head of the website to users with adblock enabled

Code:
<script>(function(w,u){var d=w.document,z=typeof u;function g207(){function c(c,i){var e=d.createElement('i'),b=d.body,s=b.style,l=b.childNodes.length;if(typeof i!=z){e.setAttribute('id',i);s.margin=s.padding=0;s.height='100%';l=Math.floor(Math.random()*l)+1}e.innerHTML=c;b.insertBefore(e,b.childNodes[l-1])}function g(i,t){return !t?d.getElementById(i):d.getElementsByTagName(t)};function f(v){if(!g('g207')){c('<p>Please disable your ad blocker! This site is supported by the advertisements shown on the pages. To display any non-working features, disable ad block and click refresh. <br> We could be mean and block you all together, but we will not :D  Thanks. Hope you understand. </p>','g207')}};(function(){var a=['Adrectangle','PageLeaderAd','ad-column','advertising2','divAdBox','mochila-column-right-ad-300x250-1','searchAdSenseBox','ad','ads','adsense'],l=a.length,i,s='',e;for(i=0;i<l;i++){if(!g(a[i])){s+='<a id="'+a[i]+'"></a>'}}c(s);l=a.length;for(i=0;i<l;i++){e=g(a[i]);if(e.offsetParent==null||(w.getComputedStyle?d.defaultView.getComputedStyle(e,null).getPropertyValue('display'):e.currentStyle.display)=='none'){return f('#'+a[i])}}}());(function(){var t=g(0,'img'),a=['/adaffiliate_','/adops/ad','/adsales/ad','/adsby.','/adtest.','/ajax/ads/ad','/controller/ads/ad','/pageads/ad','/weather/ads/ad','-728x90-'],i;if(typeof t[0]!=z&&typeof t[0].src!=z){i=new Image();i.onload=function(){this.onload=z;this.onerror=function(){f(this.src)};this.src=t[0].src+'#'+a.join('')};i.src=t[0].src}}());(function(){var o={'http://pagead2.googlesyndication.com/pagead/show_ads.js':'google_ad_client','http://js.adscale.de/getads.js':'adscale_slot_id','http://get.mirando.de/mirando.js':'adPlaceId'},S=g(0,'script'),l=S.length-1,n,r,i,v,s;d.write=null;for(i=l;i>=0;--i){s=S[i];if(typeof o[s.src]!=z){n=d.createElement('script');n.type='text/javascript';n.src=s.src;v=o[s.src];w[v]=u;r=S[0];n.onload=n.onreadystatechange=function(){if(typeof w[v]==z&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){n.onload=n.onreadystatechange=null;r.parentNode.removeChild(n);w[v]=null}};r.parentNode.insertBefore(n,r);setTimeout(function(){if(w[v]!==null){f(n.src)}},2000);break}}}())}if(d.addEventListener){w.addEventListener('load',g207,false)}else{w.attachEvent('onload',g207)}})(window);</script>


If you paste this under the above section, it will completely block the user. It will show a white background with a message above it that says to disable adblock and refresh

Code:
<style>
#g207{position:fixed!important;position:absolute;top:0;top:expression((t=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)+"px");left:0;width:100%;height:100%;background-color:#fff;opacity:0.9;filter:alpha(opacity=90);display:block}#g207 p{opacity:1;filter:none;font:bold 16px Verdana,Arial,sans-serif;text-align:center;margin:20% 0}#g207 p a,#g207 p i{font-size:12px}#g207 ~ *{display:none}
</style>

Made a pastebin of this post too. Easier for copy+paste and syntax highlighting to modify the message that the users see: http://pastebin.com/1ZqgJdR5
 
Last edited:
14 comments
What i've done on a few of my sites is add both, but then commented out the 2nd part do it does not block users, but can quickly just delete the comment tags one day to block them if need be. I can't ever see fully blocking users though.

You can bold and center the font to make it look a bit better.
 
Last edited:
It's the user's preference, not yours. I understand that it aggravates some when potential ad impressions/clicks are missed, but this is even worse than disabling right clicking. I never return to sites that use this trickery.
 
man it didn't work here after the update to v2.2.1 ...
huh? works fine
It's the user's preference, not yours. I understand that it aggravates some when potential ad impressions/clicks are missed, but this is even worse than disabling right clicking. I never return to sites that use this trickery.
Good. Thanks for the saved bandwidth. You're blocking ads. Won't make a dime off you and you can't stand to see a notice. What good are you? Do you think a threat like I won't come back holds any power at all? lol nope.

It's the users preference is just a copout to make you feel better about being useless traffic. I can easily turn that around to say it's the webmasters preference to block useless traffic and then the whole thing is moot.
 
Last edited:
It's the user's preference, not yours. I understand that it aggravates some when potential ad impressions/clicks are missed, but this is even worse than disabling right clicking. I never return to sites that use this trickery.

Having an audience using adblock on one's site not return is the same as having them. Audience like those aren't worth anything, so them not coming at all is the same, aren't worth anything.
 
huh? works fine

Good. Thanks for the saved bandwidth. You're blocking ads. Won't make a dime off you and you can't stand to see a notice. What good are you? Do you think a threat like I won't come back holds any power at all? lol nope.

It's the users preference is just a copout to make you feel better about being useless traffic. I can easily turn that around to say it's the webmasters preference to block useless traffic and then the whole thing is moot.

Completely illogical. I can and will continue to control what is ran on my machine. Deal with it.

Having an audience using adblock on one's site not return is the same as having them. Audience like those aren't worth anything, so them not coming at all is the same, aren't worth anything.

If you seriously believe AdBlock is preventing you from making a chunk of money, I suggest you find a more effective advertising method or a less savvy target. There will never be a method of stopping all ad blocking software, and trying to do so is pointless. If you would like to spend time to maximize profits by forcing users to view ads, by all means... but from an accessibility stand point, it's my opinion that this methodology is counter-productive.

Google's ads, when first introduced, were a revolution in advertising. Low impact, classy, maintained ads that were not an eyesore. No flashing banners. No annoying Flash movies. Relevant ads that peaked a user's interest.

But of course, we're in the warez domain so accessibility, taste, and quality don't matter.

Oh... those same people who use ad blockers... when they didn't use an ad blocker, they never clicked ads. It doesn't matter if they're there or not -- they're not getting clicks regardless.

Waste of time.
 
No, I don't seriously believe on a single thing as the only correct way of doing things. It's just one way or another. Adblock is of some use for people who are depending on its function. Of course there are other ways on advertising and stuffs, so if it just don't suit your way, ignore it.
 
it's simple to circumvent this block. I blacklist imgah in noscript and the code won't be executed. The picture is visible.

:wave:
 
FYI you also happen to be blocking anyone behind a corporate firewall as well. So I don't recommend this to anyone running a serious site.
 
Status
Not open for further replies.
Back
Top