您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
屏蔽带有关键字的微博/用户/评论, 新增屏蔽广告, 右侧主播明星推荐等
当前为
// ==UserScript== // @name 根据关键字屏蔽微博 // @namespace Blockweibo // @include http://weibo.com/* // @author http://weibo.com/chainjoy // @version 1.3 // @description 屏蔽带有关键字的微博/用户/评论, 新增屏蔽广告, 右侧主播明星推荐等 // @require https://code.jquery.com/jquery-2.2.4.min.js // @grant GM_addStyle // ==/UserScript== //=== 关键字名单 ===// var List = "金正男||北京厨子||习近"; // 以下请勿修改 GM_addStyle( 'div[feedtype=ad], ' + '#Pl_Core_ThirdHtmlData__77,' + '#Pl_Core_ThirdHtmlData__76, ' + '#v6_pl_ad_bottomtip, .PCD_mplayer, ' + '#WB_webim, #v6_pl_content_biztips, ' + '#v6_pl_rightmod_rank, ' + '#v6_pl_rightmod_ads35, ' + '#v6_pl_rightmod_ads36, ' + ' #v6_trustPagelet_recom_member, ' + '#v6_pl_rightmod_noticeboard{ display:none; } ' + '.WB_main_c .send_weibo .input {border: 1px solid #ddd; }' + '.WB_miniblog{ padding-top:40px;background:#BFE4EB;background-image: none;}' ); (function ($, undefined) { $(function () { var x = List.split("||"); mo = new MutationObserver(function(allmutations) { $(".WB_text, .WB_info").each(block); }); var targets = document.body; mo.observe(targets, {'childList': true,'characterData':true,'subtree': true}); function block(){ var txt = $(this).text(); if(findwords(txt) === true){ $(this).text('... ... ... ... ...'); $(this).parent().find('.WB_media_wrap, .WB_tag_rec').remove(); if($(this).hasClass('WB_info')){ $(this).parent().text('... ... ... ... ...'); } } } function findwords(ele){ var result = (ele.indexOf(x[0]) > -1); for(var i = 1; i <= x.length; i++){ result = result || (ele.indexOf(x[i]) > - 1); } return result; } // end }); })(window.jQuery.noConflict(true));