// ==UserScript== // @name hanascan,rawdevart网站去广告 // @description hanascan的新窗口跳转还在找原因,不知道为啥能打开一个垃圾网页,如果有知道的话务必请告诉我,我看script看到头大 // @version 1.0 // @author Tinyblack // @namespace http://tampermonkey.net/ // @namespace http://greasyfork.org/ // @include *://hanascan.com/* // @include *://rawdevart.com/* // @require https://code.jquery.com/jquery-3.5.1.min.js // @grant none // @downloadURL none // ==/UserScript== (function () { function importjquery() { var ele = document.createElement("script"); ele.setAttribute("type", "text/javascript"); ele.setAttribute("src", "https://code.jquery.com/jquery-3.5.1.min.js"); document.head.appendChild(ele); } function writeinhtml (){ var rad = document.createElement("script"); rad.setAttribute("type", "text/javascript"); rad.innerHTML = " var times = 0; function removead() { if(times<=5) { $('iframe').remove(); times++; return 0;} else{ return 1;} }" document.head.appendChild(rad); } document.body.setAttribute("onmousemove","removead()"); importjquery(); writeinhtml(); })();