字体替换,将页面全部等宽字体替换为Maple Mono NF CN
// ==UserScript==
// @name 字体替换
// @namespace http://tampermonkey.net/
// @version 1.0
// @description 字体替换,将页面全部等宽字体替换为Maple Mono NF CN
// @match *://*/*
// @grant GM_addStyle
// @license MIT
// ==/UserScript==
const fonts = new Set()
const main = () => {
let fontFaceCSS = '';
document.querySelectorAll('*').forEach(node => {
let nodeFont = getComputedStyle(node).fontFamily
if (nodeFont.includes('mono')) {
console.log(node)
node.style.fontFamily = 'Maple Mono NF CN'
}
})
}
main()
setInterval(main, 3000)