您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
字体替换,默认为Ubuntu,可自行修改,略过等宽字体
当前为
// ==UserScript== // @name 字体替换 // @namespace http://tampermonkey.net/ // @version 1.4 // @description 字体替换,默认为Ubuntu,可自行修改,略过等宽字体 // @include http://* // @include https://* // @grant none // ==/UserScript== (function () { 'use strict' const replace_font = root => { [...root.querySelectorAll('h1, h2, h3, h4, h5, h6, div, li, ol, p, ul, a, span, td, th, button, input, label, option, select')].map(ele => { try { if (!window.getComputedStyle(ele).fontFamily.toLowerCase().includes('mono')) { ele.style.fontFamily = 'Ubuntu' } } catch (e) { } }) } replace_font(document) document.addEventListener('DOMNodeInserted', e => replace_font(e.target)); })()