Drawaria Optimizer (Safe Performance Mode)

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

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

})();