Greasy Fork

Greasy Fork is available in English.

优雅的广告拦截脚本

广告拦截规则转换js脚本

当前为 2022-08-19 提交的版本,查看 最新版本

// ==UserScript==
// @name 优雅的广告拦截脚本
// @author 酷安@耗子Sky
// @description 广告拦截规则转换js脚本
// @version 3.0
// @match *://*/*
// @grant GM_setValue
// @grant GM_getValue
// @grant GM_registerMenuCommand
// @grant GM_unregisterMenuCommand
// @run-at document-start
// @namespace http://greasyfork.icu/users/452911
// ==/UserScript==

(function () {
    let rules = `
! 没有两个 # 的行和 开头为 ! 的行会忽略
! baidu.com##.ec_wise_ad
! :remove() 会用 js 移除元素,:remove() 必须放在行尾
! baidu.com###ad:remove()
! :click() 会用 js 模拟点击元素,必须放在行尾
! baidu.com###btn:click()
! 上面两个可以带参数,格式
! remove(100, 4, 200)
! 代表 首先延时 100 ms,然后执行 4 次,两次间隔 200 ms

myqqjd.com##.adsbygoogle
m.baidu.com#@#div[class*="ads"]
www.baidu.com#@#div[class*="ads"]
baidu.com#@##header > div:last-child
baidu.com#@##page-pre
cupfox.app#@#.adsbygoogle
hanyu.baidu.com##DIV#fengchao_els.c-container.card.fengchao-els
m.hupu.com##A[href^='https://mobile.yangkeduo.com/duo_transfer_channel.html']
m.hupu.com##IMG[alt='NBA英雄'][width='94%']
www.xvideos.com###ad-footer
www.xvideos.com##.thumb-ad
m.hupu.com##[class^="show_ad"]
baike.baidu.com##[onclick^="page.Mixedor.mixedOpen(this,"]
baidu.com##.rel-exp-feed-ad-item
bde4.com##A[rel='nofollow'][target='_new']
m.zzzfun.com##DIV#show-2415689770463175004-8179
jingyan.baidu.com##div.ad-card
jingyan.baidu.com###wrapper > div.exp-container:nth-child(2) > aside.wgt-ad-guess.content-box:nth-child(2)
sogou.com##.ad_result
baijiahao.baidu.com##SPAN[class='psDTG2YH-UVvL5hI8Ye4a']
baijiahao.baidu.com##SPAN[class='_2v86xffLyWbTz5nRDFr_L_ _2xxXjJo3ZlFeRRLLUMtAr_']
ifeng.com##div[class^="ad_"]
xx7411.com##[width='1230px'][height='97px'],[width='728px'][height='90px'],#Preview_vedio_area,[width='1230px']
zhidao.baidu.com##[id='knowledge-answer-list']
zhidao.baidu.com##.doodle-container,.feed-recommend,.wgt-recommend-business,[class*="-ads"],[class*="related-yxiao-item"],[class*="icon-bdad"],[class*="-youx"]
baidu.com###qtqy_container
javbus.com##div.container-fluid:nth-child(9) > div.row > div.ad-list:nth-child(3)
baidu.com###relative_shop_flow
cpu.baidu.com##A[href*='cpro.baidu.com']
baidu.com##.ec_wise_ad
baike.baidu.com##[class="qtqy-container"],[class="yitiao-content J-yitiao-content"],[class="yitiao-title"]
www.baidu.com,m.baidu.com##DIV[class='qrcode call']
m.sohu.com##[data-v-7a7c15af][href^='https://m.sohu.com/promotion'],[data-v-7a7c15af][data-spm-type='resource'][data-spm-data='4']
913e.com###footad_913e
www.bde4.cc##[src*='p.qpic.cn/vshpic']
bing.com##.b_ad
baidu.com##DIV.c-result.result[srcid='mkt_ad_space']
baidu.com##[class^='ball-wrapper']
baidu.com##[style^="bottom:"][class^="ball-wrapper__"]
baidu.com##div.se-recommend-word-list,#se-recommend-word-list-container
baidu.com##a.ball-wrapper__3BTBO.c-blocka
www.baidu.com###content_left > *:not([id]) *,[class="result c-container new-pmd"][id="1"][tpl="se_com_default"][data-click="{"]
so.toutiao.com##section.commonbox.hasfooter
pornhub.com##DIV.adContainer
pornhub.com##DIV.topAdContainter
smartapps.cn##swan-nest-banner-ad.ad-expose
smartapps.cn##.sw-22__bdad-wrap,.sw-22__ad-expose
mini.yyrtv.com##.right-gg
www.58wk.com##[style='display: block;']
www.58wk.com##qhd
www.58wk.com##[src*="640200.gif"]
www.58wk.com##rrk
www.58wk.com##[src="/111/1.gif"]
www.58wk.com##div#gdggw2
www.58wk.com##div#bottomJuSha
www.olevod.com##DIV.B1Lss,.B1Rss
www.dldxdyfsyy.com##DIV[style='position:relative;']
nfmovies.com##DIV[class='clearfix']
duboku.net##div.container:nth-child(2) > div.row:last-child > div.col-md-wide-7.col-xs-1.padding-0:first-child > div.myui-panel.myui-panel-bg.clearfix:nth-child(3) > div.myui-panel-box.clearfix > div.myui-panel_bd > div.col-xs-1
5dm.tv##[src*="sinaimg.cn"]
yemancomic.com##div > center > strong > button[onclick^="window.location.href"]
a.maorx.cn##[style^='display: block; opacity: 1; transform: ']
m.yhdm.io##[style='width: 100%; height: 90px;']
share.acgnx.se##IMG[src*='share.acgnx.se']
0du123.com,24en.com,3gsc.com.cn,591hx.com,5g0a.com,acgnx.se,aguitar.cn,btzx2017.com,e0514.com,eastmoney.com,guitarchina.com,gz0668.com,hk.on.cc,iguaji.com,iqiyi.com,jia360.com,joy.cn,kdnet.net,kumi.cn,manyuancs8.xyz,newnet.cc,rain2.top,tiboo.cn,toocle.com,wallstreetcn.com,xingkbjm.com,xizi.com,zgfznews.com,zyue.com##.banner
yxdm.tv##[class^="adv"]
m.iqiyi.com##DIV.iqyGuide-content,.cover
baidu.com##div#J-super-layer-promote
m.4pcc.com##DIV.a-loading
ddrk.me###obay_hf_i
ddrk.me##DIV#afc_sidebar_2842azjfh2jf737.shanxihaowu.com
zhihu.com##A.MHotFeedAd,.MRelateFeedAd,.WeiboAd-wrap,.AdvertImg.AdvertImg--isLoaded.MBannerAd-image,.Banner-adTag,[href='https://maimai.cn/']
happymh.com##[src="https://c.nationaltcm.com/ad/tm1111dd.png"]
www.9ekk.com##[rel='nofollow'],[class='onlywap']
www.zhenbuka.com##[id='ad_img'],[src*='p3-tt.byteimg.com']
lanzoui.com##DIV[style='margin-top:17px;min-width: 130px;']
www.bimiacg.com##[class='ssr1']
www.9ekk.com##[class^='vod-db']
www.58wk.com##[src*='.gif']
m.dmh8.com##[id^="test"]
www.pabopa.com##DIV[style='width: 100%;'],DIV[carousel-item],DIV#slide.layui-carousel,DIV.closeable
www.ncdj24.com##[href='https://gcsyslc.com/'],[href='https://865761.com/'],[id*='KdW'],[class*='col-style d-4 m-2 lo1ad1ed ']
zhcedu.cn##DIV#yrcma5696
zhcedu.cn##VIDEO[x5-video-player-fullscreen='false']
zhcedu.cn##IMG.vd_bt[src*='https://ae01.alicdn.com/kf/']
8666.tv##DIV.vdgd
m.kkkkwu.cc##DIV.vdgdo
www.nangua5.com##[id*="_"][class*="_"],[id^="k"],[style*='height: 130px;'],[style*='left: 0px; ']
mengmiandaxia.com,mengmiandaxia.cn##[id="mmdx-bottom-ad"]
88btbtt.com,51btbtt.com,52btbtt.com,91btbtt.com,mebtbtt.com,btbtt.life,btbtt.live,btbtt.xyz##[id="wrapper_left_bg"],[id="wrapper_right_bg"],[class="width imgs_1"],[class="wrapper_bg_c hidden-xs"]
m.silisili.in##DIV[style='height:100px;margin : 10px 0px 50px 0px;']
baidu.com##div[class$="-ecom-ads"]
bimibimi.cc##[src^='https://dd-static.jd.com']
baidu.com##.ec-ad
sohu.com##DIV#bottomBanner[data-spm='b-mb'][data-spm-stop='init']
sohu.com##DIV.middle-insert-ad
sohu.com##DIV#middleBanner[data-spm='a-mb'][data-spm-stop='init']
sohu.com##DIV.top-bill-wrapper[data-spm='a-tb'][data-spm-stop='init']
sohu.com##[data-spm^='ad-']
sohu.com##div.cbd-plate-bill.common-ad
##[href^='https://jincai.sohu.com/']
##[href*='sohu.com/hy-op']
##[href='/jump.html']
##[href='/ad.html']
###topNavad
###bottomNavad
##[href^='https://www.uerlqe.com']
##.ff-ads
##.ssr1
##[href^='https://m.jgg18.org/']
##[href^='https://xcc.nvnxxrk.cn']
##[poster^='https://i.opiwb.com:']
##[href="http://www.28cpw.com"]
##[href^='https://ccs.holor0701.cn/']
##.ad_img
##[onclick="window.open('/statics/js/hth1111.html')"]
##.swiper-wrapper.leo-source-cho
##.ayx[style="position: fixed;bottom: -10px;right:0;z-index:999;width:250px"]
##[href*="/entry/register/?i_code="]
##[style$='auto;text-align: center;line-height: initial;margin-bottom: 10px;margin-left: 20px;margin-right: 20px;']
##[style$="both;margin: auto;text-align: center;line-height: initial;margin-bottom: 10px;"]
##[href='/hy-66-90.php']
##[href='javascript:GoDb58649();']
##[poster^='https://img.hylmxing.com:']
##[rel='nofollow'][href*='com:'][target='_blank']
##[style="width:100%;height:30vw;"][src^="https://oddsds.com/img/"]
##[src='/js/detail_bottom.gif'][alt='detail_bottom']
##[onclick="window.open('https://docs.qq.com/doc/DZEpZc2pOaFdXa0tD');"]
##[href^='https://at.umtrack.com/']
##[href='https://leyu001.ee/']
##[href^='https://dcc.sclanlian.com/cc/']
##[href^='https://x7463.com:']
##[href^='https://w5979.com:']
##oxk
##[href^='https://mcc.rhwg4js.cn/']
##[href='https://xkk5.com/sqy.png']
##[onclick="window.open('http://682kg.com/')"]
###ppphref[rel='nofollow']
##[href='https://91.yelang8.cc/']
##[href='http://yb6277.vip']
##div>span>[href='###']
##.afc_close_content,.cfa_popup,[href='http://kst6632.com/']
##[href='http://app.tianbo17.com/']
##[href='http://page.shokuhou.com/']
##[href*='taobao.com/'][target='_blank']
##[href='https://hongxiu.me']
##[href^='https://record.brave108.com/']
##[href^='https://gougew.lanzoub.com/']
##[target='_blank'][href='https://u.jd.com/J7NwrL ']
##[href^='https://7segu.taobao.com/'],[href='http://m.shokuhou.com/download/']
##[href^='https://www.visvn.cn/c.php']
##[href^='https://www.xdh0808.com/']
##[href='/ad/bfy.html']
##[style^="pointer-events: none;background-image:url('https://33789.qqqwww987.site"],[style^='z-index: 2147483647; height: 123px; ']
###ad-header-mobile-contener
##[href^='http://cp.kankandy.xyz/']
##[href^='https://www.exing118.com'][rel='nofollow'][target='_new']
##[href='http://link.pf.xf.udividends.in'][target='_blank'][data-type='link']
##[src^='https://p.jngdg.top/'][alt]
##[src*='.wdach.com/']
###downapp1
##[src^='https://n5893.com'],[src^='https://gezkdx7.com'],[src^='https://n8182.com']
##[href='https://ad.ysgc.xyz/zb.html']
##[href^="https://9996867.com"]
##[href="/ad/007.html"]
##A[href='/hth.html']
##[alt="要恰饭的嘛"]
##img#hth[onclick^="window.open"]
##[onclick*='https://i.opiwb.com:']
##[href='https://click.aliyun.com/m/1000332699/']
##[href^='http://www.blmh77.com/']
##[src^='https://qwe0231141.bj.bcebos.com/']
##[href^='https://e.akmhw.com/c.html']
##[href='http://d2.wenqiche.com/xnk.apk']
##[href='http://danm.xsgyfm.com:15889']
##[src^='https://mydisplay.ctfile.com/popview.php']
##[href^='https://23538595.com:']
##DIV#ad-index.col-12.position-relative
##.gr_slide_car_inner
##[src='/pic/111.jpeg'][style='width: 100%;']
##[href='javascript:GoTp();']
##[class*="isboostSideSlideShow"]
##[id^="active_overlay"]
##.__isboostOverContent
##[href^="https://www.ex311.com:"]
##.C1U,.C1M,.C2L,.C2R
##[src^='/Uploads/ad/'][src$='.gif'][alt='广告']
##[src*='.gif'][width='99%'][height='118'][style='border:0;']
##[href='http://www.fcf0020.xyz']
##[href="/js/c-7-16.html"][title="2021"]
##[alt=' 腐乐漫 '],[alt=' 西瓜社 ']
##[href="http://dx106.live"]
##[href^='https://jwmic.91lu001.com']
##[src="https://i.hhhjiimg.com/xall/sp37.gif"]
##[kidjhy=""]
##img#hth[onclick$="hth.html')"]
##[onclick="window.open('/kapi/tj.php')"]
##[href^='https://www.hthty601.com:']
##.ads
##[src^='https://play.cdn6.buzz/js/']
##[href^='http://www.hyd59.com/']
##[href='https://www.aiwajbh.com/mh.php']
##[href^="https://l.tyrantdb.com/"]
##[href^="http://ldy.fanlimanhua.cn/"]
##div#reader-scroll.acgn-reader-chapter.v>div>center>strong>button
##[onclick^="window.location.href='https://apps.apple.com/cn/app/%E9%80%9F%E9%98%85%E5%B0%8F%E8%AF%B4"]
##[href^='https://www.ex329.com:']
##.fed-part-advs.fed-text-center.fed-font-xvi
##[href='https://xiaoya358.com']
##[href='https://www.ivyelite.net/school-cooperation/']
##[src*='/chen-xing/figure_bed_']
##[href^='http://pai.597606.com:']
##[onclick="window.location.href='https://www.biquge.app'"]
##.appguide-wrap[onclick*="bcebos.com"]
##[onclick^="window.location.href"][onclick*=".bcebos."]
##[poster^="https://yun.lhqykq.cn/shandong/"],[poster^='https://yun.fayscb.cn/shandong/']
##[href^='https://www.xxmh608.com/u.htm']
##A[href='/xinghuo-20.html']
##[src='/js/ad_/mobile_bottom.gif']
##[src='/js/ad_/mobile_f.jpg']
##a[href*=".vxzmok.com"]
##[href='https://fkub.xyz/umko']
###hongbao20201217
###whYuTlxF
##[href^='/client/getapp.aspx']
##[href^='http://web-bookstore.cread.com/haizhuishushare']
##[href='/qp-3.html']
##[src^='/static/'][onclick='openurl()'][lazyload][importance='low']
##[href="javascript:GoDb();"]
##[href^='https://www.xxmh639.com/']
##[href^='https://www.ex312.com:']
##a[href*=".yixing-hb.com"]
##[src='/pic/0001.gif']
##[src^='https://www.zxucii.com:']
##[onclick^='window.open("https://www.zxucii.com:']
##[src^='https://yngdms.com:']
##[evhrumjx]
##[href^='https://6f2929.com']
###t4>a
##[href^='https://kcc.qrjxween.com/cc/']
##[class^=c_c][style^='text-align:']
###ad1[url][onclick='window.open(this.url)'][src^='https://bj.bcebos.com/im-cs/'][width='100%']
##[onclick="window.open('/statics/js/hth906.html')"]
###ad_a[href^='https://www.xxmh'][target='_blank']
##[href='#'][onclick='openurl(); return false'][target='_blank']
##[href^='https://nf.brushshopy.com/']
##[href='http://66.dsx.tf/']
##[href^='https://aisite.wejianzhan.com/site/m.vip.com/']
##[src^='https://qing.hellocdn.top/Cartoon/sss']
##[href='javascript:gl0212();'][ontouchstart='this.click();']
##[src^='https://img.hylmxing.com:']
##[src='https://new.163.com/xf.ts']
##[id^="_vdo_ads_player"]
##.zozoads
##[href^='https://bvipsa.com']
##[src='/gold.jpg'][alt='温馨提醒']
##[href='http://856882.com']
##[href='http://938966.com']
##[href='http://732199.com']
##[href^='http://hbalsm.com:']
##[href^='http://amlyg.com:']
###bl_mobile_float[style='height: 152px;']
###sOIcquIT
##[href^='https://xcc.ztdzpyf.cn/']
##[href='https://www.kissyvape.com/']
##[href^='https://2022025.com/']
##[class^="chapter_"] > .baiduCenter
##[href^='https://www.44553606.com:']
##[href^='https://v44868.com:']
##[href^='https://yh.133svip.com/']
##[href^='https://t2406.com:']
##[href^='http://91mh.co']
##[href^='http://mm.alameinv.com/']
##[onclick='gourl()'][src^='/images/bfq/']
##[href^='https://www.xxmh'][href*='.htm']
##[href^='https://stock.weibo.cn/zh/match']
##[href^='https://vip.infobbs.xyz/atl.php']
##[href='http://953u.cc'],[href^='https://lz.vxzmok.com/']
##[onclick^="window.location.href = 'http://wd.haoyundm.com"]
##[src*='.jpg'][style='width: 100%;border-radius: 5px;']
##[href^='https://www.lyty648.com']
##[href^='https://www.vofcr2a.com']
##[href='http://li.hmwang.cc']
##[href='https://blfanss.com']
##[onclick="window.open('https://docs.qq.com/doc/DZGtmWUxpamJGTnNY');"]
##[src^="https://763667.com/"][src*=".gif"],[src^="https://763667.com/"][width="100%"],[onclick^="tj('menu','text'"]
##[href='https://app.kkj.cn/']
##[href^='https://dt.mydrivers.com/zt.ashx']
##[href^='https://dt.mydrivers.com/qq.ashx']
##[href^='https://detail.tmall.com/item.htm'][rel='nofollow']
##[href^='https://l.h-ero.games/']
###pppimg[src='/m2.gif']
##[width='100%'][src^='/js/ad_/mobile'][src*='jpg']
##[href^='https://xt.nktxv.com'],[href^='https://xe.vldbd.com']
##.adsbygoogle
##.banner[align='center']
###coupletBox
##.advertise
##[href^='https://xcc.rpkcqtf.cn/']
##a.gggg[href^="https"]
##[href='https://cai35b9.com/']
##[href^='https://0414483.com/']
##[href='https://www.100cup.com/'],[href^='https://beizidalu.com']
##[href='/tiao/'][target='_blank']
##[style^="position:fixed;left:0;top:3px;height:122px;width:100%"]
##[style="visibility: visible; display: block;"]
##[style*="https://777.qweewq"]
##.width.imgs_1
##[href^='https://jd.dangbei.com/']
##[href^='https://dt.mydrivers.com/b.ashx']
##.bottom-pic,.col-pd.mb10
##.mi_btcon.ad
##.fc_foot
##SPAN[style="position: fixed; bottom: 30vh; z-index: 2147483647; right: 0px; margin-right: 6vw; padding: 0px; text-decoration: none; background-color: red; width: 7vw; height: 7vw; border-radius: 7vw; font-size: 6vw; color: rgb(255, 255, 255); text-align: center; transform: rotate(-90deg);"]
##SPAN#qdSZ2
##.popup + .shortcuts-mobile-overlay
##div[class^="is_"] > a > img[referrerpolicy="no-referrer"][src*="hdslb.com"]
##[href^='https://xcc.nbfieef.cn/cc/']
##[alt='ACG里番']
##[href='https://www.riqingxs.com/']
##[alt='52bl']
##[alt='西瓜社']
###ad-1,#ad-2,#ad-3,#ad-4,#ad-5,#ad-6,#ad-7
##[src='https://pnm.hpvitycz.cn/00.jpg']
###mobile-index > div[id^="ins"]
###mobile-index > div#vodbm
##[href^='https://1815844.com/'],.playtop.col-pd
##[onclick*='www.l4lui.com'],.col-12.position-relative>b
##.theme-dark>.ayx>a
##[id^="wrapper_left_bg"][href="javascript:void(0);"],[id^="wrapper_right_bg"][href="javascript:void(0);"]
##[ontouchstart='this.click();'][href^='https://wd.haoyundm.com']
##[onclick^="window.open('http://jx2.dxsdkw.cn"]
##[href^='http://mh'][href*='tiklink.cc']
##[href^='https://65564535.com']
##[href^='https://ccs.holor0803.cn']
##[onclick='window.open(this.url)']
##[onclick="window.open('/statics/js/hth112.html')"]
##[href^='https://vip.huijujiavip.com']
##[href='/sswj.html'][target='_self'][rel='nofolllow']
##[href='https://segucrwj.taobao.com'][rel='nofollow']
##[href='/cwm2.html'][rel='nofollow']
##[href^='https://item.taobao.com/item.htm'][rel='nofollow']
##[style*="http://demon-uploader.rosepink.us/uploads/2021092615471716347.gif"]
##[href='/gg1.html'][rel='nofollow']
##[href^='https://www.hiweha.com/']
##[href^='https://5376.exing150.com:']
52movieba.com,bimibimi.me,acglala.net,ainuody.com,awaker.cn,cangku.in,ccav1.com,cdsoso.me,cgown.com,cn163.net,cosersuki.org,epinv.com,eroacg.com,galacg.me,gmgard.com,haochi123.com,hcomic.in,hexieshe.cn,hexieshe.com,hexieshe.xyz,hggard.com,hmghmg.com,hmog.me,htcui.com,huan.moe,idanmu.at,jiecao123.com,jitapu.com,jiyingw.net,jobbole.com,kisssub.org,languang.co,liuli.pw,moe-acg.cc,moe-acg.us,mydrivers.com,nxing.cn,oyksoft.com,rijutv.com,souxue8.com,speedtest.cn,toutiao.com,tucao.one,vpansou.com,xxshe.info,xxshe.xyz,youku.com##a[href*=".taobao.com"]
  `,
        selarray = [],
        welarray = [],
        seloarray = [],
        menuNum = null,
        valKey = 'ajs_disabled_domains',
        disas = GM_getValue(valKey, '').split(',');

    function gmMenuMgmt(disabled) {
        if (menuNum) {
            GM_unregisterMenuCommand(menuNum);
        }
        menuNum = GM_registerMenuCommand(
            disabled ? '在此网站启用拦截' : '在此网站禁用拦截',
            gmValuesMgmt.bind(this, !disabled)
        )
    }

    function gmValuesMgmt(add) {
        if (add) {
            if (!disas.includes(location.hostname)) {
                disas.push(location.hostname);
            }
            GM_setValue(valKey, disas.join(','));
            disas = GM_getValue(valKey, '').split(',');
            gmMenuMgmt(true);
        } else {
            if (disas.includes(location.hostname)) {
                disas.splice(disas.indexOf(location.hostname), 1);
            }
            GM_setValue(valKey, disas.join(','));
            disas = GM_getValue(valKey, '').split(',');
            gmMenuMgmt(false);
        }
    }

    function execOperation(sel, param, click) {
        setTimeout(() => {
            for (let c = parseInt(param[1]); c >= 1; --c) {
                setTimeout(() => {
                    document
                        .querySelectorAll(sel)
                        .forEach((a) => (click ? a.click() : a.remove()));
                }, parseInt(param[2]) * (c - 1));
            }
        }, parseInt(param[0]));
    }
    function pushOperation(sel, op, type) {
        let tempParamArray = ["0", "1", "0"];
        if (sel.split(op)[1].indexOf(",") > 0) {
            tempParamArray = sel.split(op)[1].slice(0, -1).split(",");
        }
        seloarray.push({
            sel: sel.split(op)[0],
            type: type,
            param: tempParamArray,
        });
    }
    function parseFunc(sel) {
        if (sel.indexOf(":remove(") > 0) {
            pushOperation(sel, ":remove(", 1);
        } else if (sel.indexOf(":click(") > 0) {
            pushOperation(sel, ":click(", 2);
        } else {
            seloarray.push({ sel: sel, type: 0 });
        }
    }
    function myfun() {
        let disa = disas.includes(location.hostname);
        gmMenuMgmt(disa);
        if (disa) return;
        let styelem = document.createElement("style"),
            parseDomains = (rule, sep) => {
                let domains = rule.split(sep)[0].split(","),
                    selector = rule.split(sep)[1];
                domains.forEach((domain) => {
                    if (domain.slice(0, 1) == "~") {
                        if (location.hostname.indexOf(domain.slice(1)) >= 0) return;
                    } else {
                        if (location.hostname.indexOf(domain) < 0 && domain !== "*") return;
                    }
                    if (sep == "#@#") {
                        welarray.push(selector);
                    } else {
                        selarray.push(selector);
                    }
                });
            };

        rules.split("\n").forEach((rule) => {
            if (rule.indexOf("!") == 0) {
                return;
            } else if (rule.indexOf("#@#") > 0) {
                parseDomains(rule, "#@#");
            } else if (rule.indexOf("#@#") == 0) {
                welarray.push(rule.slice(3));
            } else if (rule.indexOf("##") > 0) {
                parseDomains(rule, "##");
            } else if (rule.indexOf("##") == 0) {
                selarray.push(rule.slice(2));
            }
        });

        selarray.forEach((sel) => {
            if (!welarray.includes(sel)) parseFunc(sel);
        });

        document.documentElement.appendChild(styelem);
        let csel = "";
        seloarray.forEach((selo) => {
            switch (selo.type) {
                case 0:
                    csel += `,${selo.sel}`;
                    break;
                case 1:
                    execOperation(selo.sel, selo.param, 0);
                    break;
                case 2:
                    execOperation(selo.sel, selo.param, 1);
                    break;
            }
        });
        if (csel.length >= 2) {
            styelem.textContent = csel.slice(1) + " {display: none !important;};";
        }
    }
    myfun();
})();