Prodigy Enhancer

Enhance Prodigy with dark mode, shortcuts, and layout improvements

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

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