Drawaria Optimizer (Safe Performance Mode)

Reduce animaciones y carga gráfica para mejorar rendimiento en Drawaria

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Drawaria Optimizer (Safe Performance Mode)
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Reduce animaciones y carga gráfica para mejorar rendimiento en Drawaria
// @author       Optimizer
// @match        *://*drawaria*/*
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function() {
    'use strict';

    console.log("⚡ Drawaria Optimizer activado");

    // 1️⃣ Desactivar animaciones y efectos pesados
    const style = document.createElement("style");
    style.innerHTML = `
        * {
            animation: none !important;
            transition: none !important;
            box-shadow: none !important;
        }
        canvas {
            image-rendering: pixelated !important;
        }
    `;
    document.head.appendChild(style);

    // 2️⃣ Reducir FPS (menos carga de CPU)
    const originalRAF = window.requestAnimationFrame;
    window.requestAnimationFrame = function(callback) {
        return originalRAF(() => {
            setTimeout(callback, 33); // Limita a ~30 FPS
        });
    };

    // 3️⃣ Pausar pestaña si está en segundo plano (ahorra recursos)
    document.addEventListener("visibilitychange", function() {
        if (document.hidden) {
            console.log("⏸️ Pestaña en segundo plano - reduciendo actividad");
        }
    });

})();