Greasy Fork

Greasy Fork is available in English.

净化主流新闻资讯网站影响阅读体验的广告

净化易有料、东方头条(东方资讯)、快科技(驱动之家)、MSN每日新闻、凤凰科技、TechWeb、QQ、edge浏览器自带的新闻资讯等广告,因为这些广告简直铺天盖地,非常影响体验,还你一个纯洁的新闻世界

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         净化主流新闻资讯网站影响阅读体验的广告
// @namespace    https://github.com/wzhjm/
// @version      1.9
// @license      GPL-3.0
// @description  净化易有料、东方头条(东方资讯)、快科技(驱动之家)、MSN每日新闻、凤凰科技、TechWeb、QQ、edge浏览器自带的新闻资讯等广告,因为这些广告简直铺天盖地,非常影响体验,还你一个纯洁的新闻世界
// @author       wzshjm
// @match        *://*.yiyouliao.com/*
// @match        *://*.eastday.com/*
// @match        *://news.mydrivers.com/*
// @match        *://*.msn.cn/*
// @match        *://tech.ifeng.com/*
// @match        *://*.techweb.com.cn/*
// @match        *://new.qq.com/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @require http://code.jquery.com/jquery-2.1.4.min.js
// @grant        none
// ==/UserScript==

(function () {
    'use strict';
    window.onload = () => {
        var host = window.location.host
        var timer
        // 易有料
        if (host.indexOf('yiyouliao.com') > -1) {
            //移除左边的推荐
            $('.yyl-weiruan-ads-main').remove();
            $('.yyl-ads-main, .yyl-news-footer').remove();
            $('.yyl-article-detail-main .yyl-article-detail-content img').css('max-width', '760px');
            var recommend = $('.yyl-article-detail-recommend');
            recommend.next().remove()
            recommend.remove()
            //中间内容宽度适配
            $('.yyl-weiruan-content .yyl-weiruan-news-main').css('width', '100%')
        }

        // 东方头条(东方资讯)
        if (host.indexOf('eastday.com') > -1) {
            $('head').append('.tips-dsp .tips-pop { display: none; top: -100%; filter: none; } .filterblur { -webkit-filter: none; -moz-filter: none; -ms-filter: none; -o-filter: none; filter: none }')
            $('.main_content > .aside').remove() // 删除左侧推荐
            $('.bottom_over_cnt').remove() // 删除底部推荐
            $('.J-bdsharebuttonbox-wrap, .bdshare-special').remove() // 删除浮动按钮
            $('.pagination a[pdata]').remove() // 删除最后一页是广告
            $('.article, .detail_left').css('width', '100%')
            $('#dftt-message-wrapper').remove()//删除添加桌面提示
            // 处理闲置时间广告
            timer = setInterval(function () {
                $('body > .tips-pop, body > .tips-dsp').remove()
            }, 3000)
        }

        // 快科技(驱动之家)
        if (host.indexOf('news.mydrivers.com') > -1) {
            $('body > .pathway').remove()
            $('body > .baidu').remove()
            $('iframe, .main_right, .page_article, .like_box, .xianguan').remove()
            $('.main_left').css('width', '100%')
        }

        // MSN每日新闻
        if (host.indexOf('msn.cn') > -1) {
            $('#filmstripouter, #aside, .postarticlecontent').remove()
            $('#maincontent').next().remove()
            $('#main').css('width', '100%')
            function on_continue_reading() {
                let continue_reading = document.querySelector("[id^='continue-reading-']")
                $('homepage-footer').remove()
                $('.consumption-page-gridarea_rail').remove()
                $('.consumption-page-structure').css('grid-template-columns', '48px 10px 80% 0 0')
                if (continue_reading) {
                    continue_reading.click()
                    clearInterval(timer)
                }
            }
            on_continue_reading()
            timer = setInterval(on_continue_reading, 1000)
        }

        // 凤凰科技
        if (host.indexOf('tech.ifeng.com') > -1) {
            function removeAd() {
                $('div[class|=rightContent]').remove()
                $('div[class|=leftContent]').css('width', '100%')
                $('div[class|=artical]').css('width', '100%').nextAll().each(function (i, o) {
                    $(o).remove()
                })
            }
            setTimeout(removeAd, 100)
            setTimeout(removeAd, 1000)
        }

        // TechWeb
        if (host.indexOf('techweb.com.cn') > -1) {
            function removeTechWebAd() {
                $('.main_l, .main_r, .article_product, .weibo_weixin, .relative_news, .hotpot, .recommend').remove()
                $('.main_c').css('width', '100%').css('margin', 0)
            }
            setTimeout(removeTechWebAd, 10)
        }

        // QQ
        if (host.indexOf('new.qq.com') > -1) {
            function removeQqAd() {
                $('#RIGHT, #GoTop, #Recomend, #LeftTool, #bottomAd, #Comment, .qq_footer').remove()
                $('.LEFT, .content, .content-article').css('width', '100%')
            }
            setTimeout(removeQqAd, 10)
        }
    }
})();