[Pixlr] Unlimited Saves UPDATED: (26/03/2024)

Bypasses the daily save limit

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        [Pixlr] Unlimited Saves UPDATED: (26/03/2024)
// @namespace   NiceATC
// @match       https://pixlr.com/*/*
// @grant       none
// @version     1.0
// @author      All Crdits to ClaytonTDM
// @description Bypasses the daily save limit
// @run-at      document-start
// @license MIT
// ==/UserScript==

(() => {
    // Define as configurações do usuário no armazenamento local
     localStorage.setItem('user-settings', '{"lastNewsCheck":"1970-01-01T00:00:00Z"}');

    let deletedModal = false;

    window.addEventListener('load', function () {
        // Define o nó alvo e a configuração do observador de mutação
        let targetNode = document.body;
        let config = { childList: true, subtree: true };

        // Cria um observador de mutação
        let observer = new MutationObserver(function (mutationsList, observer) {
            for (let mutation of mutationsList) {
                if (mutation.type === 'childList') {
                    // Verifica se há uma modal e a remove
                    let modal = document.querySelector('.modal');
                    if (modal && !deletedModal) {
                        setTimeout(() => {
                            modal.remove();
                            deletedModal = true;
                        }, 50);
                    }
                }
            }
        });

        // Inicia a observação
        observer.observe(targetNode, config);

        // Define um intervalo para atualizar o horário da última verificação de notícias no armazenamento local
        setInterval(() => {
             localStorage.setItem('user-settings', {"lastNewsCheck":"${new Date().toISOString()}"});
        }, 500);
    });
})();