Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function() {
- // Define a function for showing the message.
- // Set a timeout of 1 seconds to give adblocker
- // Detecting Add on is enable or disable
- var tryMessage = function() {
- setTimeout(function() {
- if(!document.getElementsByClassName) return;
- var ads = document.getElementsByClassName('afs_ads'),
- ad = ads[ads.length - 1];
- if(!ad
- || ad.innerHTML.length == 0
- || ad.clientHeight === 0) {
- jQuery.ajax({
- type : "post",
- url : "http://world4ufree.cc/wp-admin/admin-ajax.php?action=adblockvisitor",
- success: function(response) {
- //console.log(response);
- }
- });
- jQuery("#dialog").dialog({
- title:'*Stop* seems like you are using ad-blocker',
- closeOnEscape:false,
- modal: true,
- draggable: false,
- height: 420,
- width: 533,
- create: function( event, ui ) {
- jQuery(".ui-dialog .ui-dialog-titlebar #ui-id-1").css({'text-align':'center','width':'100%'})
- }
- });
- }else {
- jQuery.ajax({
- type : "post",
- url : "http://world4ufree.cc/wp-admin/admin-ajax.php?action=adblockvisitordis",
- success: function(response) {
- //alert(response);
- }
- });
- }
- }, 1000);
- }
- /* Attach a listener for page load ... then show the message */
- if(window.addEventListener) {
- window.addEventListener('load', tryMessage, false);
- } else {
- window.attachEvent('onload', tryMessage); //IE
- }
- })();
Advertisement
Add Comment
Please, Sign In to add comment