Greasy Fork is available in English.

FallMamontsBlock

Mamonts are no longer flying :(

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         FallMamontsBlock
// @namespace    http://tampermonkey.net/
// @version      2.2
// @description  Mamonts are no longer flying :(
// @author       k3kzia
// @license      MIT
// @match        *://lolz.guru/*
// @match        *://zelenka.guru/*
// @match        *://lolz.live/*
// @grant        GM_registerMenuCommand
// @grant        GM_setValue
// @grant        GM_getValue
// @run-at       document-start
// ==/UserScript==

(function () {
    'use strict';

    const defaultSettings = {
        snowMinJs: true,
        interactiveMinJs: true
    };

    const settings = GM_getValue('blockSettings') || defaultSettings;

    if (!GM_getValue('blockSettings')) {
        GM_setValue('blockSettings', defaultSettings);
    }

    const blockList = [];
    if (settings.snowMinJs) blockList.push('snow.min.js');
    if (settings.interactiveMinJs) blockList.push('interactive.min.js');

    const isBlocked = (src) => blockList.some(blockedUrl => src.includes(blockedUrl));

    const observer = new MutationObserver((mutations) => {
        mutations.forEach((mutation) => {
            mutation.addedNodes.forEach((node) => {
                if (node.tagName === 'SCRIPT' && node.src && isBlocked(node.src)) {
                    console.log('Blocked script:', node.src);
                    node.remove();
                }
            });
        });
    });

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

    GM_registerMenuCommand(
        `Падающие мамонты (Сейчас ${settings.snowMinJs ? 'выключены' : 'включены'})`,
        () => {
            settings.snowMinJs = !settings.snowMinJs;
            GM_setValue('blockSettings', settings);
            alert(`Падающие мамонты ${settings.snowMinJs ? 'выключены' : 'включены'}, пожалуйста, перезагрузите страницу`);
        }
    );

    GM_registerMenuCommand(
        `Взаимодействия (Сейчас ${settings.interactiveMinJs ? 'выключены' : 'включены'})`,
        () => {
            settings.interactiveMinJs = !settings.interactiveMinJs;
            GM_setValue('blockSettings', settings);
            alert(`Взаимодействия ${settings.interactiveMinJs ? 'выключены' : 'включены'}, пожалуйста, перезагрузите страницу`);
        }
    );
})();