Prodigy Enhancer

Enhance Prodigy with dark mode, shortcuts, and layout improvements

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==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);
})();