您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
我的地盘,我做主!
当前为
// ==UserScript== // @name 本地黑名单-知乎 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 我的地盘,我做主! // @author lavaf // @match https://www.zhihu.com/question/* // @match https://www.zhihu.com/question/*/answer/* // @grant none // @require https://cdn.bootcss.com/jquery/3.4.1/jquery.js // ==/UserScript== (function() { 'use strict'; ////www.zhihu.com/people/ let blackList=['la-la-la-la-la-55-20','mazhihang','song-ling-dao-jie-shou-huo-yan-jing-hua', 'hong-liao-2','wang-tang-min','qing-er-wu-hen'] setInterval(function () { console.log('start') let nameList=$("div.CommentItemV2"); nameList.each(function (i,e) { if ($(e).attr('data-lavaf') !== '1') { let id = $(e).find("a.UserLink-link").attr("href"); for (const blackListKey in blackList) { if (blackList.hasOwnProperty(blackListKey)) { //console.log(id); if ("//www.zhihu.com/people/"+blackList[blackListKey] === id) { $(e).text(id+" 此用户已经被屏蔽") $(e).attr('data-lavaf','1'); } } } } }); let List=$("div.AnswerItem"); List.each(function (i,e) { if ($(e).attr('data-lavaf') !== '1') { let id = $(e).find('a.UserLink-link').attr("href"); for (const blackListKey in blackList) { if (blackList.hasOwnProperty(blackListKey)) { //console.log(id); if ("//www.zhihu.com/people/"+blackList[blackListKey] === id) { $(e).text(id+" 此用户已经被屏蔽") $(e).attr('data-lavaf','1'); } } } } }); },500) })();