Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Blockadblock: Difference between revisions

Template page
No edit summary
No edit summary
Line 1: Line 1:
<html>
<html>
<script type="text/javascript">
<script type="text/javascript">
(function detectAdblockWithInvalidURL(callback) {
var npDetect = new (function () {
  var flaggedURL = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js';
    this.blocking = false;
    var errcnt = 0;
    function testImg() {
        var i = new Image();
        i.onerror = () => {
            errcnt++;
            if (errcnt < 3) {
                setTimeout(testImg, 250);
            } else {
                npDetect.blocking = true;


  if (window.fetch) {
                if (document.dispatchEvent && window.CustomEvent) {
    var request = new Request(flaggedURL, {
                    document.dispatchEvent(
      method: 'HEAD',
                        new CustomEvent('np.blocking', {
      mode: 'no-cors',
                            detail: {
    });
                                blocking: npDetect.blocking,
    fetch(request)
                            },
      .then(function(response) {
                        })
        if (response.status === 404) {
                    );
          callback(false);
                }
        }
            }
      })
         };
      .catch(function(error) {
        i.onload = () => {
         callback(true);
            npDetect.blocking = false;
      });
        };
  } else {
    var http = new XMLHttpRequest();
    http.open('HEAD', flaggedURL, false);


    try {
        i.src = 'https://s.nitropay.com/1.gif?' + Math.random() + '&adslot=';
      http.send();
    } catch (err) {
      callback(true);
     }
     }
    testImg();
})();
</script>


     if (http.status === 404) {
<script type="text/javascript">
      callback(false);
document.addEventListener('np.blocking', (e) => {
     if (e.detail.blocking) {
        alert("It looks like you're using an ad-blocker!\n\nIf you enjoy our content, please support our site by disabling your adblocker. We depend on ad revenue to keep creating quality content for you to enjoy for free. Ads are necessary to keep the platform free for all.\n\nYou can also disable all ads by activating the subscription in your account. In this way, you will be providing serious financial support to our website. For details, please email us.");
     }
     }
  }
});
})(function(usingAdblock) {
  alert("It looks like you're using an ad-blocker!\n\nIf you enjoy our content, please support our site by disabling your adblocker. We depend on ad revenue to keep creating quality content for you to enjoy for free. Ads are necessary to keep the platform free for all.\n\nYou can also disable all ads by activating the subscription in your account. In this way, you will be providing serious financial support to our website. For details, please email us." + usingAdblock);
})
  </script>
</html>
</html>

Revision as of 01:29, 17 November 2022

Advertising: