// ==UserScript== // @name hanascan,rawdevart网站去广告 // @description Remove ADs from hanascan.com and rawdevart.com, make the pictures to be seen better on hanascan.com // @version 1.1 // @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 () { var func = "var web = window.location.href;var times = 0;function removead(){if(times<=5){$('iframe').remove();times++;if(web.match('hanascan')!=null){resetimg();}return 0;}else{return 1;}}function resetimg(){if(times<=5){$('img').each(function(){$(this).css('width','90');$(this).css('height','100%');});return 0;}else{return 1;}}"; 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 = func; document.head.appendChild(rad); } document.body.setAttribute("onmousemove","removead()"); importjquery(); writeinhtml(); //to prevent that script do not execute var web = window.location.href; if(web.match('hanascan')!==null) { $('.lazy.media-object.img-thumb').each( function() { $(this).css('width','90'); $(this).css('height','100%'); }); } $('iframe').remove(); return 0; })(); /* functions var web = window.location.href; var times = 0; function removead(){ if(times<=5) { $('iframe').remove(); times++; if(web.match('hanascan')!=null) { resetimg(); } return 0; } else{ return 1; } } function resetimg(){ if(times<=5) { $('img').each(function(){ $(this).css('width','90'); $(this).css('height','100%'); }); return 0; } else{ return 1; } } */