您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
享受無廣告體驗的巴哈姆特吧!
// ==UserScript== // @name 巴哈姆特-阻擋廣告 // @name:zh-TW 巴哈姆特-阻擋廣告 // @name:zh-HK 巴哈姆特-阻擋廣告 // @name:en Bahamut - No more Ads! // @namespace BahamutAntiAd // @description 享受無廣告體驗的巴哈姆特吧! // @description:zh-TW 享受無廣告體驗的巴哈姆特吧! // @description:en Enjoy Bahamut Without any advertisement! // @author SeaBao // @include /https?:\/\/.+\.gamer\.com\.tw(\/.+)?/ // @version 1.2.1 // @grant none // @run-at document-body // @icon http://i.imgur.com/uvVy2nm.png // @date 2016-12-24 // ==/UserScript== (function() { 'use strict'; var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; var observer = new MutationObserver(function(){ killADs(); }); var option = { 'childList': true, 'subtree': true }; observer.observe(document.body, option); // Send 'AntiAd' function to its Death Object.defineProperty(window, 'AntiAd', { enumerable: true, writable: false, value: null }); function killADs() { // Remove the Ad elements on the website. var adList = document.body.querySelectorAll("#flyRightBox>div, #BH-bigbanner, .BA-billboard, .BA-cboxAD, #aswift_0_expand"); for (var i=0; i < adList.length; i++) { adList[i].parentNode.removeChild(adList[i]); } } })();