让网页使用浏览器设置的sans-serif字体,放在fontFamily前面的字体会被优先使用。参考:https://www.cnblogs.com/yaomumu/p/12759060.html
注意:

  1. @match要修改一下,匹配所有的网页
  2. font-family需要改写为驼峰形式fontFamily
// ==UserScript==
// @name         use sans-serif
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        http*://*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    /*document.body.style.backgroundColor = '#00ee00'*/
    //document.body.style.cssText += 'sans-serif';
    document.body.style.fontFamily='sans-serif';
    // Your code here...
})();

相关文章:

  • 2021-09-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-13
  • 2021-09-25
  • 2022-12-23
猜你喜欢
  • 2021-12-06
  • 2021-12-19
  • 2021-12-29
  • 2021-06-19
  • 2021-12-12
  • 2022-01-02
  • 2021-12-13
相关资源
相似解决方案