// ==UserScript== // @name 滚动条美化 // @namespace laster2800 // @version 1.0.0.20210803 // @description 美化滚动条 // @author Laster2800 // @license LGPL-3.0 // @grant GM_addStyle // @run-at document-start // @match *://*/* // @downloadURL none // ==/UserScript== (function() { let css = `body::-webkit-scrollbar { width: 15px; height: 12px; background-color: #00000000; } body::-webkit-scrollbar-thumb { background-color: #00000040; } body::-webkit-scrollbar-corner { background-color: #00000000; }`; if (typeof GM_addStyle !== "undefined") { GM_addStyle(css); } else { const styleNode = document.createElement("style"); styleNode.appendChild(document.createTextNode(css)); (document.querySelector("head") || document.documentElement).appendChild(styleNode); } })();