Remover

With this Script you can edit every Website.

За да инсталирате този скрипт, трябва да имате инсталирано разширение като Tampermonkey, Greasemonkey или Violentmonkey.

За да инсталирате този скрипт, трябва да инсталирате разширение, като например Tampermonkey .

За да инсталирате този скрипт, трябва да имате инсталирано разширение като Tampermonkey или Violentmonkey.

За да инсталирате този скрипт, трябва да имате инсталирано разширение като Tampermonkey или Userscripts.

За да инсталирате скрипта, трябва да инсталирате разширение като Tampermonkey.

За да инсталирате този скрипт, трябва да имате инсталиран скриптов мениджър.

(Вече имам скриптов мениджър, искам да го инсталирам!)

За да инсталирате този стил, трябва да инсталирате разширение като Stylus.

За да инсталирате този стил, трябва да инсталирате разширение като Stylus.

За да инсталирате този стил, трябва да инсталирате разширение като Stylus.

За да инсталирате този стил, трябва да имате инсталиран мениджър на потребителски стилове.

За да инсталирате този стил, трябва да имате инсталиран мениджър на потребителски стилове.

За да инсталирате този стил, трябва да имате инсталиран мениджър на потребителски стилове.

(Вече имам инсталиран мениджър на стиловете, искам да го инсталирам!)

// ==UserScript==
// @name            Remover
// @description     With this Script you can edit every Website.
// @description:de  Mit diesem Skript können sie jede beliebige Website bearbeiten.
// @version         5.2.1.2
// @author          Wack.3gp (https://greasyfork.org/users/4792)
// @copyright       2013+, Wack.3gp
// @namespace       https://greasyfork.org/users/4792
// @license         CC BY-NC-ND 4.0; http://creativecommons.org/licenses/by-nc-nd/4.0/
//
// @match           *://*/*
// @noframes
// @priority        9999
//
// @grant           GM_notification
// @grant           GM_registerMenuCommand
// @grant           GM_addStyle
//
// @compatible      Chrome tested with Tampermonkey
// @supportURL      https://greasyfork.org/scripts/4612/feedback
// @contributionURL https://www.paypal.com/donate/?hosted_button_id=BYW9D395KJWZ2
// @contributionAmount €1.00
// ==/UserScript==

/* jshint esversion: 9 */

(function() {
    'use strict';

    const _vault = "4792";
    const _isOriginal = GM_info.script.namespace.includes(_vault);
    const _originalURL = GM_info.script.supportURL.replace("feedback", "");

    GM_addStyle(`
        #remover-quick-actions {
            position: fixed; bottom: 20px; right: 20px; z-index: 10000;
            background: #222; color: #fff; padding: 15px; border-radius: 8px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.5); font-family: sans-serif;
            display: flex; flex-direction: column; gap: 10px; border: 1px solid #444;
            animation: removerFadeIn 0.3s ease;
        }
        #remover-quick-actions b { color: #f44336; font-size: 14px; }
        .remover-btn {
            background: #444; color: white; border: none; padding: 8px 12px;
            border-radius: 4px; cursor: pointer; text-align: center; font-size: 13px;
            transition: background 0.2s;
        }
        .remover-btn:hover { background: #666; }
        .remover-btn.save { background: #f44336; }
        .remover-btn.save:hover { background: #d32f2f; }
        @keyframes removerFadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
    `);

    const checkProtection = () => {
        if (!_isOriginal) {
            alert("Please install the Original Version");
            window.location.href = _originalURL;
            return false;
        }
        return true;
    };

    const downloadPage = () => {
        if (!checkProtection()) return;

        const clone = document.documentElement.cloneNode(true);
        const uiElement = clone.querySelector('#remover-quick-actions');
        if (uiElement) uiElement.remove();

        const scripts = clone.querySelectorAll('script');
        scripts.forEach(s => s.remove());

        const htmlContent = clone.outerHTML;
        const blob = new Blob([htmlContent], { type: 'text/html' });
        const url = URL.createObjectURL(blob);
        const link = document.createElement('a');
        link.href = url;
        link.download = `Edited_${document.title.replace(/[/\\?%*:|"<>]/g, '-')}.html`;
        link.click();
        URL.revokeObjectURL(url);
    };

    const showQuickActions = () => {
        if (document.getElementById('remover-quick-actions')) return;

        const container = document.createElement('div');
        container.id = 'remover-quick-actions';
        container.innerHTML = `
            <b>Remover Session Finished</b>
            <button class="remover-btn save" id="remover-download">💾 Download as HTML</button>
            <button class="remover-btn" id="remover-close">✕ Close</button>
        `;
        document.body.appendChild(container);

        document.getElementById('remover-download').onclick = () => {
            downloadPage();
            container.remove();
        };
        document.getElementById('remover-close').onclick = () => container.remove();

        setTimeout(() => { if (document.body.contains(container)) container.remove(); }, 15000);
    };

    const toggleEditMode = () => {
        if (!checkProtection()) return;

        const isCurrentlyOff = (document.designMode === 'off' || document.designMode === '');
        
        if (isCurrentlyOff) {
            document.designMode = 'on';
            document.body.contentEditable = 'true';
            notifyUser("Edit Mode: ENABLED");
        } else {
            document.designMode = 'off';
            document.body.contentEditable = 'false';
            notifyUser("Edit Mode: DISABLED");
            showQuickActions();
        }
    };

    function notifyUser(message) {
        if (typeof GM_notification === 'function') {
            GM_notification({ title: GM_info.script.name, text: message, timeout: 2000 });
        }
    }

    GM_registerMenuCommand("🚀 Start/Stop Editing", toggleEditMode);
    GM_registerMenuCommand("💾 Direct Download HTML", downloadPage);
    
        GM_registerMenuCommand("☕ Buy Me a Coffee :)", function () {
alert("Hello, I'm " + GM_info.script.author + "\nand I wrote this script as a hobby.\nIf you find it useful, buy me a coffee :)");
    window.open(GM_info.script.header.match(/@contributionURL\s+(.+)/)[1], "_blank");
        });

    if (_isOriginal) {
        console.log(`%c ${GM_info.script.name} v${GM_info.script.version} %c (Verified Original)`, 
                    "background: #f44336; color: white; font-weight: bold; padding: 2px 5px;", "color: #f44336;");
    }

})();