nascent / PlayStation Web Store Enhancer

// ==UserScript==
// @name         PlayStation Web Store Enhancer
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Enhance the PlayStation web store experience with dark mode.
// @author       nascent & naveedgol
// @match        https://store.playstation.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=playstation.com
// @run-at       document-start
// @updateURL    https://openuserjs.org/meta/nascent/PlayStation_Web_Store_Enhancer.meta.js
// @downloadURL  https://openuserjs.org/install/nascent/PlayStation_Web_Store_Enhancer.user.js
// @copyright    nascent & naveedgol
// @license      MIT
// @grant        GM_getValue
// @grant        GM_setValue
// @grant        GM_addStyle
// @grant        GM_registerMenuCommand
// ==/UserScript==

(function() {
    'use strict';

    const darkModeEnabled = GM_getValue("dark-mode", true);

    if (darkModeEnabled) {
        GM_addStyle(`
            body {
                background-color: #000 !important;
            }

            body, p, span, div, a, h1, h2, h3, h4, h5, h6, li, td, th {
                color: white !important;
            }

            /* Navigation bar styling */
            [class*="shared-nav"], [class*="tertiary"], header {
                background-color: #1a1a1a !important;
                color: white !important;
            }

            [class*="shared-nav"] a, [class*="shared-nav"] button,
            [class*="tertiary"] a, [class*="tertiary"] button {
                color: white !important;
            }

            /* SVG icons - force white fill and stroke with reduced weight */
            svg {
                fill: white !important;
                stroke: white !important;
                stroke-width: 0.5 !important;
            }

            svg * {
                fill: white !important;
                stroke: white !important;
                stroke-width: 0.5 !important;
            }

            button {
                background-color: #333 !important;
                color: white !important;
                border-color: #555 !important;
            }

            button:hover {
                background-color: #555 !important;
            }

            input, textarea, select {
                background-color: #1a1a1a !important;
                color: white !important;
                border-color: #333 !important;
            }
        `);
    }

    GM_registerMenuCommand("Toggle Dark Mode", () => {
        let current = GM_getValue("dark-mode", true);
        GM_setValue("dark-mode", !current);
        alert("Dark Mode is now " + (!current) + ". Please refresh the page to apply changes.");
    });
})();