Overleaf 编辑器字体修改

该脚本允许你自定义 Overleaf 编辑器的字体。

当前为 2022-11-29 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Overleaf Editor Font Customizer
  3. // @name:zh-CN Overleaf 编辑器字体修改
  4. // @namespace https://greasyfork.org/en/scripts/455589
  5. // @version 1.0
  6. // @description Customize your Overleaf editor's font family.
  7. // @description:zh-CN 该脚本允许你自定义 Overleaf 编辑器的字体。
  8. // @author billchen2k
  9. // @license MIT
  10. // @match https://www.overleaf.com/project/*
  11. // @icon https://www.google.com/s2/favicons?sz=64&domain=overleaf.com
  12. // @grant GM_addStyle
  13. // ==/UserScript==
  14.  
  15. // Change this to your desired font family.
  16. var fontFamily = "Consolas, CMU Typewriter Text, Songti SC";
  17.  
  18. (function() {
  19. 'use strict';
  20. window.addEventListener('load', function() {
  21. GM_addStyle(`.cm-content {font-family: ${fontFamily} !important;}`);
  22. }, false);
  23. })();