您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Customizable Bilibili UP blocker via UID -- 利用 UID 屏蔽 b站 UP主
// ==UserScript== // @name Bilibili UP blocker // @namespace https://github.com/sync-coding // @version 1.1 // @description Customizable Bilibili UP blocker via UID -- 利用 UID 屏蔽 b站 UP主 // @author sync-coding // @license GNU GPLv3 // @match *.bilibili.com/* // @grant GM_log // @run-at document-end // @charset UTF-8 // ==/UserScript== 'use strict'; var localBlockList = []; var remoteBlockList = []; var blockList = localBlockList.concat(remoteBlockList); setInterval(function(){ var allVideoOwnerElements, videoOwnerElement; allVideoOwnerElements = document.evaluate( '//a[@class="bili-video-card__info--owner"]', document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); var i; for (i = 0; i < allVideoOwnerElements.snapshotLength; i++) { var node = allVideoOwnerElements.snapshotItem(i); var href = node.attributes.getNamedItem("href").value; if (href.match(/\/\/space.bilibili.com\/.*/g)) { var UID = parseInt(href.replace(/.*com\//i,"")); if (blockList.includes(UID)) { node.parentNode.parentNode.parentNode.parentNode.parentNode.remove(); } } } },1000);