您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Bilibili Autoplay & WideScreen
当前为
// ==UserScript== // @name B站 自动播放 & 网页宽屏 // @namespace https://greasyfork.org/users/91873 // @version 1.0.0.2 // @description Bilibili Autoplay & WideScreen // @author wujixian // @include http*://*bilibili.com/video/* // @include https*//*bilibili.com/bangumi/play/* // @grant none // @run-at document-end // ==/UserScript== (function () { 'use strict'; console.log('=== autoplay & widescreen') let playing = 0 let play_count_limit = 3 let widescreen = false let main = setInterval(function () { if (!widescreen) { // find wide screen button let wideScreenBtn = document.getElementsByClassName('bilibili-player-video-btn-widescreen') console.log('=== Wide Screen Button:', wideScreenBtn) if (wideScreenBtn) { // check widescreen status let closed = wideScreenBtn[0].className.includes('closed') console.log('=== Closed:', closed) if (closed) { console.log('=== widescreen OK') widescreen = true } else { wideScreenBtn[0].click() } } } if (playing < play_count_limit) { // find start button on player area bottom let playBtn = document.getElementsByClassName('bilibili-player-video-btn-start'); console.log('=== Play Button:', playBtn) if (playBtn) { // check play status let check = playBtn[0].className.includes('video-state-pause') console.log('=== Playing check:', check) if (!check) { playing++ console.log('=== playing', playing) } else { playBtn[0].click() } } } if (playing >= play_count_limit && widescreen) { console.log('=== quit loop') clearInterval(main) video_wrap.removeEventListener('click', stop_automatic) } }, 500); })();