Guest User

Untitled

a guest
Jan 13th, 2016
61,063
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function() {
  2.  
  3.         // Define a function for showing the message.
  4.         // Set a timeout of 1 seconds to give adblocker
  5.         // Detecting Add on is enable or disable
  6.        
  7.         var tryMessage = function() {
  8.             setTimeout(function() {
  9.                 if(!document.getElementsByClassName) return;
  10.                 var ads = document.getElementsByClassName('afs_ads'),
  11.                     ad  = ads[ads.length - 1];
  12.                 if(!ad
  13.                     || ad.innerHTML.length == 0
  14.                     || ad.clientHeight === 0) {
  15.                         jQuery.ajax({
  16.                          type : "post",
  17.                          url : "http://world4ufree.cc/wp-admin/admin-ajax.php?action=adblockvisitor",
  18.                                 success: function(response) {
  19.                                     //console.log(response);
  20.                                 }
  21.                             });
  22.                         jQuery("#dialog").dialog({
  23.                                 title:'*Stop* seems like you are using ad-blocker',
  24.                                 closeOnEscape:false,
  25.                                 modal: true,
  26.                                 draggable: false,
  27.                                 height: 420,
  28.                                 width: 533,
  29.                                 create: function( event, ui ) {
  30.                                     jQuery(".ui-dialog .ui-dialog-titlebar #ui-id-1").css({'text-align':'center','width':'100%'})
  31.                                     }
  32.                            });                       
  33.                                      
  34.                         }else {
  35.                             jQuery.ajax({
  36.                             type : "post",
  37.                             url : "http://world4ufree.cc/wp-admin/admin-ajax.php?action=adblockvisitordis",
  38.                                 success: function(response) {
  39.                                     //alert(response);
  40.                                 }
  41.                             });
  42.                         }
  43.  
  44.             }, 1000);
  45.         }
  46.  
  47.         /* Attach a listener for page load ... then show the message */
  48.         if(window.addEventListener) {
  49.             window.addEventListener('load', tryMessage, false);
  50.            
  51.         } else {
  52.             window.attachEvent('onload', tryMessage); //IE
  53.         }
  54. })();
Advertisement
Add Comment
Please, Sign In to add comment