Defancied Discord

Removes Discord's premium custom fonts, nameplates, multicolor gradients, and hover glow effects.

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Defancied Discord
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Removes Discord's premium custom fonts, nameplates, multicolor gradients, and hover glow effects.
// @author       moozooh
// @match        https://discord.com/*
// @match        https://*.discord.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=discord.com
// @license      MIT
// @grant        none
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';

    // Add CSS to override premium fonts and remove glow effects
    const style = document.createElement('style');
    style.textContent = `
        /* Force default Discord font everywhere */
        * {
            font-family: "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
        }

        /* Remove all gradients and glow effects */
        [class*="convenienceGlowGradient"],
        [class*="usernameGradient"],
        [class*="twoColorGradient"] {
            background: none !important;
            -webkit-text-fill-color: unset !important;
            filter: none !important;
            /* Use the text-decoration-color as the actual text color */
            color: var(--custom-gradient-color-1, currentColor) !important;
        }

        /* Remove premium nameplate backgrounds from member list */
        [class*="nameplated"] .container__4bbc6,
        [class*="nameplated"] [class*="container"][style*="background: linear-gradient"] {
            display: none !important;
        }
    `;

    // Insert the style as early as possible
    if (document.head) {
        document.head.appendChild(style);
    } else {
        const observer = new MutationObserver((mutations, obs) => {
            if (document.head) {
                document.head.appendChild(style);
                obs.disconnect();
            }
        });
        observer.observe(document.documentElement, { childList: true, subtree: true });
    }

    // Additional check to reapply styles if needed
    window.addEventListener('load', () => {
        if (!document.head.contains(style)) {
            document.head.appendChild(style);
        }
    });
})();