MediaWiki:Blockadblock.js

MediaWiki interface page

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
(function detectAdblockWithInvalidURL(callback) {
  var flaggedURL = 'https://s.nitropay.com/ads-1285.js';

  if (window.fetch) {
    var request = new Request(flaggedURL, {
      method: 'HEAD',
      mode: 'no-cors',
    });
    fetch(request)
      .then(function(response) {
        if (response.status === 404) {
          callback(false);
        }
      })
      .catch(function(error) {
        callback(true);
      });
  } else {
    var http = new XMLHttpRequest();
    http.open('HEAD', flaggedURL, false);

    try {
      http.send();
    } catch (err) {
      callback(true);
    }

    if (http.status === 404) {
      callback(false);
    }
  }
})(function(usingAdblock) {
  if(sessionStorage.getItem('showAlert') != "false"){
    alert("Hello, visitor! It looks like you're using an ad-blocker. Please consider adding Gamebrew.org to your adblock whitelist or please disable your browser's ad-blocker. Our ads support the development and upkeep of the site. Thank you.");
     sessionStorage.setItem('showAlert', "false");
    }  
})

Advertising: