您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
在Bilibili网站上自动点击网页全屏按钮实现全屏浏览视频的功能。
当前为
// ==UserScript== // @name Bilibili网页全屏自动点击脚本 // @namespace http://tampermonkey.net/ // @version 1.0 // @description 在Bilibili网站上自动点击网页全屏按钮实现全屏浏览视频的功能。 // @author Bling Cc // @match https://*.bilibili.com/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; window.addEventListener('load', function() { var fullScreenButton = document.querySelector('div[aria-label="网页全屏"]'); if (fullScreenButton) { var rect = fullScreenButton.getBoundingClientRect(); var x = rect.left + (rect.width / 2); var y = rect.top + (rect.height / 2); var event = new MouseEvent('click', { view: window, bubbles: true, cancelable: true, clientX: x, clientY: y }); setTimeout(function() { fullScreenButton.dispatchEvent(event); }, 2000); } }); })();