Dark mode på Radio IIII

A dark mode style script for Radio IIII

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

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

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 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 });
})();