Dark mode på Radio IIII

A dark mode style script for Radio IIII

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Dark mode på Radio IIII
// @namespace    https://greasyfork.org/da/users/1356217-nuclearboyscout
// @version      1.1.0
// @license      MIT
// @description  A dark mode style script for Radio IIII
// @author       NuclearBoyScout
// @match        https://radio4.dk/*
// @grant        GM_addStyle
// ==/UserScript==

(function() {
    'use strict';

    // Funktion til at anvende stilen
    function applyStyles() {
        GM_addStyle(`

            body {
                background: #212121 !important;
                color: #cccccc !important;
            }

            footer {
                background-color: #171717 !important;
            }
            div.main.excluded.addSpotlightSeparation, div.main.excluded.spotlightBackground, div.main.excluded.spotlightStyle, div.spotlightPress.spotlightPressSquareImage.addSpacing.center, div.main.excluded {
                background-color: #2f2f2f !important;
            }


            input[type="search"] {
                background-color: #2f2f2f !important;
                color: #9b9b9b !important;
            }

            div.card.rounded {
                background-color: #444 !important;
            }

            div.card.isLive.liveCard.rounded {
                background-color: #555 !important;
            }

            div.content.center.wide {
                background: linear-gradient(90deg, #2b2a33 22%, #3a3a3a 60.5%, #4a4a4a) !important;
                color: #cccccc !important;
            }

            div.content.center.wide div.duration {
                color: #cccccc !important;
            }

            div.search {
                background-color: #2f2f2f !important;
            }

            a.router-link-active.router-link-exact-active.headerLink {
                color: #cccccc !important;
            }

            a.router-link-active.router-link-exact-active.headerLink::before {
                color: #cccccc !important;
                background-color: #2b2a33 !important;
            }

            /* Ændre farven på det første path (cirklen) */
            button.pulse svg path:first-of-type {
                fill: #171717 !important; /* Mørkere baggrund for cirklen */
            }

            /* Ændre farven på det andet path (pilen eller stop-symbol) */
            button.pulse svg path:last-of-type {
                fill: #cccccc !important; /* Lysere farve til symbolet */
            }

            /* Ændre farven på play-knappen når den er aktiv */
            button.pulse:active svg path:first-of-type {
                fill: #323232 !important; /* Mørkere baggrund for cirklen når aktiv */
            }

            button.pulse:active svg path:last-of-type {
                fill: #323232 !important;
            }

            /* Ændre farven på SVG-ikoner i knapper uden klasser */
            button:not([class]) svg path {
                fill: #cccccc !important; /* Den ønskede farve til SVG-ikoner */
            }

        `);
    }

    window.addEventListener('load', applyStyles);

    const observer = new MutationObserver(applyStyles);
    observer.observe(document.body, { childList: true, subtree: true });
})();