您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
懒得写
// ==UserScript== // @name 修改字体 // @namespace https://normal-pcer.example.com/ // @license unlicense // @version 1.0 // @description 懒得写 // @author normal-pcer // @match https://*/* // @grant none // ==/UserScript== (function () { 'use strict'; // Your code here... let fun = () => { let targets = new Array("p", "span", "a"); for (let index0 = 0; index0 < targets.length; index0++) { let t = document.getElementsByTagName(targets[index0]); for (let index = 0; index < t.length; index++) { let item = t[index]; if (item.style !== undefined) { item.style.fontFamily = "Times New Roman, 华文中宋"; } else { item.style = "font-family: Times New Roman, 华文中宋" } } } targets = new Array("h1", "h2", "h3", "h4", "h5", "h6", "header"); for (let index0 = 0; index0 < targets.length; index0++) { let t = document.getElementsByTagName(targets[index0]); for (let index = 0; index < t.length; index++) { let item = t[index]; if (item.style !== undefined) { item.style.fontFamily = "Tahoma, 微软雅黑"; } else { item.style = "font-family: Tahoma, 微软雅黑" } } } targets = new Array("pre"); for (let index0 = 0; index0 < targets.length; index0++) { let t = document.getElementsByTagName(targets[index0]); for (let index = 0; index < t.length; index++) { let item = t[index]; if (item.style !== undefined) { item.style.fontFamily = "Jetbrains Mono, 微软雅黑"; } else { item.style = "font-family: Jetbrains Mono, 微软雅黑" } } } } const observer = new MutationObserver(fun); const targetNode = document.body; const config = { attributes: true, childList: true, subtree: true, characterData: true, }; observer.observe(targetNode, config); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址