// ==UserScript== // @name 汉化组常用漫画网站去广告 // @description Make your experience better when finding mangas.\nNow including:Hanascan Rawdevart Comic-Walker // @version 1.13 // @author Tinyblack // @namespace http://tampermonkey.net/ // @namespace http://greasyfork.org/ // @include *://hanascan.com/* // @include *://comic-walker.com/* // @include *://rawdevart.com/* // @require https://code.jquery.com/jquery-3.5.1.min.js // @grant none // @downloadURL none // ==/UserScript== (function () { var web = window.location.href; 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); } importjquery(); function resetimg(){ $('.lazy').each(function(){ $(this).css('width','90'); $(this).css('height','100%'); }); return 0; } $(window).bind('load',function() { var web = window.location.href; if(web.match('comic-walker')!==null) //is comic-walker { console.log("Element:"+$('#right_bottom_banner')+"has removed."); $('#right_bottom_banner').remove(); console.log("Element:"+$('#right_top_banner')+"has removed."); $('#right_top_banner').remove(); } if(web.match('hanascan')!==null) //is hanascan { $('iframe').remove(); resetimg(); } if(web.match('rawdevart')!==null) //is rawdevart { var matchele; for(var eles = 1 ; eles <= 2 ; eles ++) { if(eles == 1){matchele = 'div';} if(eles == 2){matchele = 'iframe';} $(matchele).children().each(function(){ var eleid = $(this).attr('id'); var eleclass = $(this).attr('class'); if( eleid !== undefined ) { if( eleid.match('adtruefr')!==null ) //is ad element { console.log("Removed AD element's id:"+eleid); $(this).remove(); } } if( eleclass !== undefined) { if( eleclass.match('runative-banner')!==null || eleclass.match('rn_ad_native')!==null) //is ad element { console.log("Removed AD element's class:"+eleclass); $(this).remove(); } } }); } } } ); })();