Greasy Fork is available in English.

[BFD]Block Fake Download

屏蔽遇到过的资源网站伪下载区域, 不定期更新

// ==UserScript==
// @name         [BFD]Block Fake Download
// @name:zh      伪下载屏蔽助手
// @namespace    http://tampermonkey.net/
// @version      3.0
// @description  屏蔽遇到过的资源网站伪下载区域, 不定期更新
// @author       Zszen John
// @include     *
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var label = 'Zszen '
    var url = window.location.href;
    var res = /\/\/.+?\.(.*?)\//.exec(url);
    var site = res[1];
    ELs('a', el=>el.href.indexOf('.exe')>=0 || el.textContent.indexOf('速下载')>=0 , el=>el.style.display = 'none');
    ELs('span', el=>el.textContent.indexOf('速下载')>=0 , el=>el.parentElement.style.display = 'none');
    var isDeal = true;
    var els;
    var dic = {
        '3xiazai.com':null,
        'winwin7.com':null,
        'uzzf.com':null,
        'pc6.com':null,
        '9ht.com':null,
        'onlinedown.net':null,
        'qqtn.com':null,
        'pcsoft.com.cn':null,
        'pconline.com.cn':null,
        'yxdown.com':null,
        'jisuxz.com':null,
        'yesky.com':null,
        'cncrk.com':null,
        'liangchan.net':null,
        'aixuefu.com':null,
        'xz7.com':null,
        'zdfans.com':null,
        'newyx.net':null,
        'yunqishi.net':null,
        'veryhuo.com':null,
        'zuiben.com':null,
        'mydown.com':null,
        'cr173.com':null,
        'downcc.com':null,
        'newasp.net':null,
        '3h3.com':null,
        'xue51.com':null,
        'jb51.net':null,
        'kxdw.com':null,
        '7down.com':null,
        '32r.com':null,
        'jyrd.com':null,
        'downza.cn':null,
        'zol.com.cn':null,
        'ali213.net':null,
        'anyxz.com':()=>{
            ELs('p',el=>el.className=='fontcolor2',el=>ELs('div',null,el2=>el2.style.display='none',el));
        },
        'xpgod.com':()=>{
            ELs('ul',el=>el.className=='clearfix show_xzq',el=>el.style.display='none');
        },
        'xp510.com':()=>{
            ELs('ul',el=>el.className='clearfix bendi',el=>el.style.display='none');
        },
        'baidu.com':()=>{
            // console.log(label, site);
            function delay_deal(){
               var arr = ELs('a',
                             el=>{for(var k in dic){if(el.href.indexOf(k)>=0 && k!='baidu.com' && k!='bing.com')return true;}return false},
                            el=>{
                               el.style.textDecoration='overline';
                               el.style.color='red';
                            }
               )
               console.log(arr);
            }
            delay_deal();
            setTimeout(delay_deal, 1000);
        },
    }
    dic['bing.com'] = dic['baidu.com'];
    if(dic[site]!=null){
        dic[site]();
        ELs('iframe',null,el=>el.hidden=true);
    }else{

    }

    function ELs(tagName, conditionFun, dealFun, parent){
        if(parent==null) parent = document;
        var tags = [...parent.getElementsByTagName(tagName)];
        if(conditionFun){
            tags = tags.filter(conditionFun);
        }
        if(dealFun){
            tags.forEach(dealFun);
        }
        return tags;
    }
})();