Discord Crimson Moon

Discord theme: Crimson Moon without nitro.. its a work in progress and is still buggy

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Discord Crimson Moon
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Discord theme: Crimson Moon without nitro.. its a work in progress and is still buggy
// @author       MrBlank
// @license MIT
// @match        https://discord.com/*
// @match        https://discordapp.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    function modifyHTMLTag() {
        var htmlTag = document.documentElement;

        htmlTag.setAttribute('lang', 'en-GB');
        htmlTag.setAttribute('style', 'font-size: 100%; --saturation-factor: 1; --devtools-sidebar-width: 0px;');
        htmlTag.setAttribute('data-rh', 'lang,style,class');

        htmlTag.classList.add('custom-theme-background', 'full-motion', 'show-redesigned-icons', 'has-webkit-scrollbar', 'theme-dark', 'platform-web', 'font-size-16');
    }
    function e() {
        var style = document.createElement('style');
        style.setAttribute('data-client-themes', 'true');
        style.setAttribute('data-rh', 'true');
        style.textContent = `
    .custom-theme-background {
        --custom-theme-background: linear-gradient(64.92deg, var(--bg-gradient-crimson-moon-1) 16.17%, var(--bg-gradient-crimson-moon-2) 72%);
    }`;
        document.head.appendChild(style);
    }
    e()
    modifyHTMLTag();

    setInterval(modifyHTMLTag, 1);
    setInterval(e, 1);
})();