您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
关键字屏蔽相关微博,屏蔽广告
当前为
// ==UserScript== // @name 根据关键字屏蔽微博/广告 // @namespace Blockweibo // @include http://weibo.com/* // @author http://weibo.com/chainjoy // @version 1.2 // @description 关键字屏蔽相关微博,屏蔽广告 // @require https://code.jquery.com/jquery-2.2.4.min.js // @grant GM_addStyle // ==/UserScript== //=== 关键字名单 ===// var List = "金正男||北京厨子||习近"; // 以下请勿修改 (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().children('.WB_media_wrap, .WB_tag_rec').remove(); $(this).parents('.WB_feed_expand').remove(); } } 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; } $('.WB_cardtitle_b').parent('.WB_cardwrap').css('display','none'); GM_addStyle("#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;}"); // end }); })(window.jQuery.noConflict(true));