您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Bilibili Player Auto WideScreen!
- // ==UserScript==
- // @name Bilibili AutoWide
- // @namespace http://tampermonkey.net/
- // @version 0.7
- // @description Bilibili Player Auto WideScreen!
- // @author cuzfinal
- // @include *://www.bilibili.com/video/*
- // @include *://www.bilibili.com/bangumi/*
- // @include *://www.bilibili.com/*
- // @grant GM_addStyle
- // ==/UserScript==
- (function () {
- 'use strict';
- // Your code here...
- const $ = selector => document.querySelector(selector)
- const playerNode = $('#bilibili-player')
- if (playerNode) {
- let mo
- mo = new MutationObserver((mutationList, observer) => {
- for(const mutation of mutationList) {
- if (mutation.target.classList?.contains?.('bpx-player-control-bottom-right')) {
- if ($('.bpx-player-ctrl-wide')) {
- setTimeout(() => {
- $('.bpx-player-ctrl-wide').click()
- }, 0);
- mo.disconnect()
- }
- }
- }
- })
- mo.observe($('#bilibili-player'), {
- childList: true,
- subtree: true,
- })
- }
- const adblockCss = `
- .adblock-tips { display: none!important; }
- `
- GM_addStyle(adblockCss)
- })();