Advertisement
fadhiilrachman

detect blocker script

May 31st, 2014
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.55 KB | None | 0 0
  1. <div id="ad"><!-- ad code //--></div>
  2. <script type="text/javascript">
  3. function detectBlocker() {
  4.     if ($('#ad').height() == 0 || $('#ad').filter(':visible').length == 0 || $('#ad').filter(':hidden').length > 0) {
  5.         $('#ad').prepend('<div class="alert alert-info"><p><strong>You are using an Adblocker!</strong> This is a private, non-commercial website. If you like it please consider to donate or to <a href="abp:subscribe?location=http%3A%2F%2Flastfm.dontdrinkandroot.net%2Funblock.txt&amp;title=Last.fm%20Tools">unblock</a> it.</p></div>');
  6.     }
  7. }
  8. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement