Pixel Battles Compact Font

Уменьшенный шрифт Unbounded для Pixel Battles

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Pixel Battles Compact Font
// @namespace    http://tampermonkey.net/
// @version      1.2
// @description  Уменьшенный шрифт Unbounded для Pixel Battles
// @author       .hilkach.
// @match        https://pixelbattles.ru/*
// @grant        GM_addStyle
// ==/UserScript==

(function() {
    'use strict';

    // Загрузка шрифта
    const link = document.createElement('link');
    link.href = 'https://fonts.googleapis.com/css2?family=Unbounded:wght@400;700&display=swap';
    link.rel = 'stylesheet';
    document.head.appendChild(link);

    // Применение компактных стилей
    GM_addStyle(`
        * {
            font-family: 'Unbounded', sans-serif !important;
            font-weight: 600 !important;
            font-size: 13px !important;  /* уменьшенный размер */
            line-height: 1.3 !important;  /* компактный межстрочный интервал */
        }

        /* Заголовки */
        h1, h2, h3, h4, h5, h6,
        .header, .title {
            font-weight: 700 !important;
            font-size: 14px !important;  /* чуть больше для заголовков */
        }

        /* Чат и элементы интерфейса */
        .chat-message, .username,
        .button, .input, .select {
            font-size: 10px !important;  /* минимальный размер для чата */
        }
    `);
})();