您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
remove popup window that demands to turn of ad blockers on zkillboard.com (works on firefox only because using non-standard event 'beforescriptexecute')
// ==UserScript== // @name zkillboardNoPopup // @namespace Test // @description remove popup window that demands to turn of ad blockers on zkillboard.com (works on firefox only because using non-standard event 'beforescriptexecute') // @include https://zkillboard.com/* // @version 2 // @grant GM_xmlhttpRequest // @run-at document-start // ==/UserScript== function addScript(text) { text = text.replace(/function annoyAdBlockers.*$/,'function annoyAdBlockers(){}'); var newScript = document.createElement('script'); newScript.type = "text/javascript"; newScript.textContent = text; var head = document.getElementsByTagName('head')[0]; head.appendChild(newScript); } window.addEventListener('beforescriptexecute', function(e) { var src = e.target.src; if (src.search(/common\.js/) != -1) { e.preventDefault(); e.stopPropagation(); GM_xmlhttpRequest({ method: "GET", url: e.target.src, onload: function(response) { addScript(response.responseText); } }); } });