您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
b站大会员广告清除
当前为
// ==UserScript== // @name b站大会员广告 // @namespace wrongThing // @version 0.2 // @description b站大会员广告清除 // @author wrongThing // @match *.bilibili.com/video/* // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant none // ==/UserScript== (function () { 'use strict'; var maxCheckTime = 5 * 60 * 60; var startTime = +new Date(); var endTime = startTime + maxCheckTime; var timer = null; var count = 0; var e = document.createEvent("MouseEvents") e.initEvent('click', true, true); function clearTimer() { timer && clearInterval(timer); timer = null; } function controlAd() { count++; console.log(`【b站大会员弹窗广告检测】:第${count}次检测`) if (+new Date() >= endTime) { clearTimer(); console.log(`【b站大会员弹窗广告检测】:超时退出`) return; } const closeButton = document.querySelector('.bili-dialog-m .q1080p .icon.close'); if (closeButton) { // adDialog.parentNode.removeChild(adDialog); closeButton.dispatchEvent(e); const video = document.querySelector('video'); video && video.play(); clearTimer(); console.log(`【b站大会员弹窗广告检测】:成功清除`) } } timer = setInterval(controlAd, 200) // Your code here... })();