全局细滚动条

将所有网页的滚动条样式改为细滚动条。

目前为 2023-02-26 提交的版本。查看 最新版本

// ==UserScript==
// @name         全局细滚动条
// @namespace    http://tampermonkey.net/
// @version      1.0.1
// @description  将所有网页的滚动条样式改为细滚动条。
// @author       nosora
// @match        *://*/*
// @grant        none
// @run-at       document-start
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    var css = '::-webkit-scrollbar { width: 6px; height: 6px; border-radius: 1.5px; } ::-webkit-scrollbar-track { background-color: #f5f5f500; } ::-webkit-scrollbar-thumb { background-color: #bbbbbb90; border-radius: 1.5px; }';

    var style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    document.getElementsByTagName('head')[0].appendChild(style);
})();