[Pixlr] Bypass saves

Bypass saves in pixlr

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το 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         [Pixlr] Bypass saves
// @namespace    https://greasyfork.org/users/821661
// @version      1.0
// @description  Bypass saves in pixlr
// @author       hdyzen
// @match        https://pixlr.com/*
// @icon         https://www.google.com/s2/favicons?domain=pixlr.com/&sz=64
// @grant        none
// @run-at       document-start
// @license      GPL-3.0-only
// ==/UserScript==

const observer = new MutationObserver(mutationsHandler)

observer.observe(document.documentElement, {
    childList: true,
    subtree: true
})

function mutationsHandler(muts) {
    for (const mut of muts) {
        for (const node of mut.addedNodes) {
            if (isNodeTarget(node)) handlerScript(node);
        }
    }
}

function isNodeTarget(node) {
    return node.tagName === "SCRIPT" && node.src?.includes("/dist/express.");
}

async function handlerScript(node) {
    const src = node.src;
    const content = await fetch(src).then(res => res.text());

    const newScript = document.createElement("script");
    newScript.textContent = content.replace("l()>=3", "false");
    document.head.appendChild(newScript);

    node.remove();
}