您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
超大弹幕很影响观看体验,干掉它吧!
当前为
// ==UserScript== // @name acfun超大弹幕缩小 // @version 0.1.0 // @description 超大弹幕很影响观看体验,干掉它吧! // @author 泥壕 // @match https://www.acfun.cn/v/* // @namespace http://greasyfork.icu/users/50175 // ==/UserScript== (function () { 'use strict'; let timeId = null let count = 0 const reduceDanmaku = () => { timeId = setInterval(() => { const dom = document.querySelectorAll('.danmaku-item.danmaku-item-move') Array.prototype.forEach.call(dom, e => { if (e.style.fontSize !== '25px') { count++ window.requestAnimationFrame(() => { log(e.innerText) e.style.fontSize = '25px' }) } }) }, 600); } const log = arg => console.log('%c 超大弹幕缩小 ', 'background:#03a9f4;color:white', arg); const videoElement = document.querySelector('video') videoElement.addEventListener('play', () => { log('=开始='); reduceDanmaku() }) videoElement.addEventListener('pause', () => { window.clearInterval(timeId) log(`=中止= 已处理${count}条超大弹幕`); }) })();