// ==UserScript== // @name bilibili动态修复 // @author eh5 // @license MIT License // @version 1.0 // @description 修复BiliBili在Firefox Quantum下动态高度过大的问题 // @namespace sokka.cn // @include http*://t.bilibili.com/* // @grant none // @run-at document-end // @downloadURL none // ==/UserScript== (function (){ 'use strict'; var onload = function (){ var cardlist = document.getElementsByClassName("card-list")[0]; var searchfunc = function () { var content = cardlist.getElementsByClassName("content")[0]; if(content){ content.style.lineHeight = ""; if(!content.style.lineHeight){ console.log("动态样式修复成功"); cardlist.removeEventListener("DOMNodeInserted",searchfunc); } } } if(cardlist) cardlist.addEventListener("DOMNodeInserted",searchfunc); else console.log("未找到动态面板DOM元素"); } window.addEventListener("load", onload); })()