二次壁 Anti Adblcok Bypass

繞過二次壁的擋廣告檢查程式 + 去除側邊廣告

As of 2015-11-10. See the latest version.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        二次壁 Anti Adblcok Bypass
// @namespace   tw.nya.2cat_anti_adblock_killer
// @description 繞過二次壁的擋廣告檢查程式 + 去除側邊廣告
// @include     http://*.2nyan.org/*
// @include     http://2nyan.org/*
// @run-at document-start
// @version     2
// @grant       none
// ==/UserScript==
window.google_ad_block = 1;

if( navigator.userAgent.toLowerCase().indexOf('firefox') > -1 ){ // Firefox supports beforescriptexecute
  window.addEventListener('beforescriptexecute', function _kill_script(e) {
    if(e.target.src.indexOf("load_counter.php") != -1){
      e.preventDefault();
      e.stopPropagation();
      window.removeEventListener("beforescriptexecute", _kill_script, false);
    }
  });
}else{ // fuck chrome
  document.documentElement.addEventListener.addEventListener('load', function _kill_script_slow(e) {
    if(e.target.src.indexOf("load_counter.php") != -1){
      e.preventDefault();
      e.stopPropagation();
      document.documentElement.removeEventListener("load", _kill_script_slow, true);
    }
  }, true);
}

// Kill the Ad on load if we can't stop it at the first place (e.g. Chrome)
window.addEventListener("load", function load(event){
  window.removeEventListener("load", load, false);
  $("#counter, #counter2").remove();
});