屏蔽腾讯搜狐号桌面网页右侧推荐/热门精选的方法

=== 2022.08.07更新 ===

一种简单的方法(无需油猴插件):安装AdGuard插件,在右边栏推荐或广告处右击选择拦截元素,之后可自由选择要屏蔽拦截的内容范围。

 

=== 以下为原文(需要安装油猴插件) ===

目前写得还比较繁琐(而且可能需要刷新一下网页等几秒),欢迎提出修改建议。

1.腾讯

// ==UserScript==
// @name 纯净腾讯新闻资讯页面
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 
// @author d
// @match *://new.qq.com/*

// @grant none
// @require https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js
// ==/UserScript==


(function() { 'use strict'; // Your code here... //已登陆 $('#RIGHT').remove() setTimeout(function(){ $('#RIGHT').remove() ; }, 1000); setTimeout(function(){ $('#RIGHT').remove() ; }, 3000); setTimeout(function(){ $('#RIGHT').remove() ; }, 5000); setTimeout(function(){ //顶部信息屏蔽 $('#RIGHT').remove() ; }, 8000); })();

2.搜狐

// ==UserScript==
// @name 纯净搜狐资讯页面
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 
// @author d
// @match *://www.sohu.com/*

// @grant none
// @require https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js
// ==/UserScript==

 (function() {
'use strict';

    // Your code here...

    //已登陆
    $('#right-side-bar').remove()

    setTimeout(function(){
        $('#right-side-bar').remove() ;
    }, 1000);

    setTimeout(function(){
        $('#right-side-bar').remove() ;
    }, 3000);

    setTimeout(function(){
        $('#right-side-bar').remove() ;
    }, 5000);

    setTimeout(function(){
        //顶部信息屏蔽
        $('#right-side-bar').remove() ;

    }, 8000);

})();

 

posted @ 2022-05-19 13:42  静即青争  阅读(134)  评论(0编辑  收藏  举报