Change font to old

Made by TheMoon

目前為 2024-04-19 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Change font to old
// @namespace    http://tampermonkey.net/
// @version      2024-04-19
// @description  Made by TheMoon
// @author       You
// @match        https://*.roblox.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=roblox.com
// @grant        none
// @license      TheMoonSir - Change from new font to old font
// ==/UserScript==

(function() {
    'use strict';

    function isBuilderSans(element) {
        var fontFamily = window.getComputedStyle(element).fontFamily;
        return fontFamily.includes('Builder Sans');
    }

    function changeFontFamily() {
        var elements = document.querySelectorAll('.builder-font, .builder-font .h1, .builder-font .h2, .builder-font .h3, .builder-font .h4, .builder-font .h5, .builder-font .h6, .builder-font h1, .builder-font h2, .builder-font h3, .builder-font h4, .builder-font h5, .builder-font h6, .builder-font .text, .builder-font body, .builder-font button, .builder-font html, .builder-font input, .builder-font pre, .builder-font select, .builder-font textarea');
        elements.forEach(function(element) {
            element.style.fontFamily = 'HCo Gotham SSm, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif';
        });
    }

    var elements = document.querySelectorAll('.builder-font');
    elements.forEach(function(element) {
        if (isBuilderSans(element)) {
            changeFontFamily();
        }
    });
})();