您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
自动取消 Bilibili 视频播放完成后的推荐视频操作
当前为
// ==UserScript== // @name Bilibili自动取消推荐续播 // @name:en Auto Cancel Up Next (Bilibili) // @namespace http://tampermonkey.net/ // @version 1.0.0_2024-12-12 // @description 自动取消 Bilibili 视频播放完成后的推荐视频操作 // @description:en Automatically cancel recommended video actions after Bilibili videos have finished playing // @author 屑屑, Ting Yi(fork) // @match *://www.bilibili.com/video/* // @grant none // @license MIT // ==/UserScript== (function () { 'use strict'; console.log('BilibiliCancelNext: init'); function setupAutoCancel() { if(!location.host.includes('bilibili.com')) { console.log('BilibiliCancelNext: 当前网站并不支持跳过'); } const root = document.querySelector('#bilibili-player > div > div > div.bpx-player-primary-area > div.bpx-player-video-area > div.bpx-player-ending-wrap > div.bpx-player-ending-panel'); const observer = new MutationObserver(() => { const button = document.querySelector('div > div > div.bpx-player-ending-related > a:nth-child(1) > div.bpx-player-ending-related-item-cover > div.bpx-player-ending-related-item-cancel'); if (button && button.style.display !== 'none') { button.click(); console.log('BilibiliCancelNext: 取消按钮已点击'); } }); observer.observe(root, { subtree: true, attributes: true, attributeFilter: ['class', 'style']}); } setupAutoCancel(); })();