Greasy Fork is available in English.
通过修改css的方法,自动将网站字体(TagName为h1、h2、h3、h4、h5、h6、div、p的元素)改成浏览器默认字体。
// ==UserScript==
// @name 自动将网站字体改成浏览器默认字体
// @version 0.0.3
// @match *://*/*
// @description 通过修改css的方法,自动将网站字体(TagName为h1、h2、h3、h4、h5、h6、div、p的元素)改成浏览器默认字体。
// @license MIT
// @namespace http://greasyfork.icu/users/187381
// ==/UserScript==
const defaultFontFamily = `
font-family: initial !important;
}
`;
const arr = ["html", "body", "h1", "h2", "h3", "h4", "h5", "h6","div", "p"];
for (const v of arr) {
const elems = document.getElementsByTagName(v);
for (var i = 0; i<elems.length; i++) {
elems[i].style.cssText = defaultFontFamily;
}
}