Skip to content

Instantly share code, notes, and snippets.

@zerowebcorp
Created October 13, 2012 09:24
Show Gist options
  • Save zerowebcorp/3883935 to your computer and use it in GitHub Desktop.
Save zerowebcorp/3883935 to your computer and use it in GitHub Desktop.
jQuery AdBlock Detection
/*
* jQuery AdBlock Detection
* Author: Vivek
* Web: http://www.vivekv.com
*
* Create a file named advertisement.js with this one line content "$.ads = true;"
* Then include the file in your html.
*/
$(function(){
if($.ads == undefined)
alert("Ads are disabled");
});
@Kaztur
Copy link

Kaztur commented Nov 14, 2015

Script seems doesn't work - event reacts even without any adblocks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment