docs.rs iosevka term font

change the default fonts on rust docs sites

Versión del día 14/03/2024. Echa un vistazo a la versión más reciente.

// ==UserScript==
// @name         docs.rs iosevka term font
// @namespace    http://tampermonkey.net/
// @version      1
// @description  change the default fonts on rust docs sites
// @author       You
// @match        https://docs.rs/*, https://doc.rust-lang.org/*, https://crates.io/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=docs.rs
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Select all elements with a class containing "font" (common for code blocks)
    const codeElements = document.querySelectorAll("div, a, ol, li, ul, p, pre, code, .font");

    // Loop through each element
    codeElements.forEach(element => {
        // Set the font family to Iosevka Term
        element.style.fontFamily = "Iosevka Term, monospace";
    });

})();