Prodigy Enhancer

Enhance Prodigy with dark mode, shortcuts, and layout improvements

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Prodigy Enhancer
// @namespace    https://greasyfork.org/users/yourusername
// @version      1.0
// @description  Enhance Prodigy with dark mode, shortcuts, and layout improvements
// @author       Abel
// @match        https://prodi.gy/*
// @grant        none
// ==/UserScript==

(function () {
    'use strict';

    // Add Dark Mode Styles
    const darkModeStyles = `
        body {
            background-color: #121212 !important;
            color: #ffffff !important;
        }
        .header, .footer {
            background-color: #1e1e1e !important;
        }
        .button {
            background-color: #333333 !important;
            color: #ffffff !important;
        }
    `;

    const styleSheet = document.createElement('style');
    styleSheet.type = 'text/css';
    styleSheet.id = 'dark-mode-styles';
    styleSheet.innerText = darkModeStyles;
    document.head.appendChild(styleSheet);

    // Add a Dark Mode Toggle Button
    const darkModeToggle = document.createElement('button');
    darkModeToggle.textContent = 'Toggle Dark Mode';
    darkModeToggle.style.position = 'fixed';
    darkModeToggle.style.top = '10px';
    darkModeToggle.style.right = '10px';
    darkModeToggle.style.padding = '10px';
    darkModeToggle.style.zIndex = '1000';
    darkModeToggle.onclick = () => {
        const darkMode = document.getElementById('dark-mode-styles');
        if (darkMode) {
            darkMode.remove();
        } else {
            document.head.appendChild(styleSheet);
        }
    };
    document.body.appendChild(darkModeToggle);

    // Add Keyboard Shortcuts
    document.addEventListener('keydown', (e) => {
        if (e.ctrlKey && e.key === 'd') {
            e.preventDefault();
            darkModeToggle.click(); // Toggle Dark Mode with Ctrl+D
        }
        if (e.ctrlKey && e.key === 's') {
            e.preventDefault();
            alert('Custom Save Shortcut Activated!');
        }
    });

    // Improve Layout: Example of resizing panels
    const resizePanels = () => {
        const panels = document.querySelectorAll('.panel');
        panels.forEach(panel => {
            panel.style.width = '45%';
            panel.style.margin = '10px';
        });
    };
    window.addEventListener('load', resizePanels);
})();