Overleaf Editor Font Customizer

Customize your Overleaf editor's font family.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         Overleaf Editor Font Customizer
// @name:zh-CN   Overleaf 编辑器字体修改
// @namespace    https://greasyfork.org/en/scripts/455589
// @version      1.0
// @description  Customize your Overleaf editor's font family.
// @description:zh-CN  该脚本允许你自定义 Overleaf 编辑器的字体。
// @author       billchen2k
// @license      MIT
// @match        https://www.overleaf.com/project/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=overleaf.com
// @grant        GM_addStyle
// ==/UserScript==

// Change this to your desired font family.
var fontFamily = "PragmataPro Liga, Consolas, CMU Typewriter Text, Songti SC";

(function() {
    'use strict';
    window.addEventListener('load', function() {
        GM_addStyle(`.cm-content {font-family: ${fontFamily} !important;}`);
    }, false);
})();