Greasy Fork is available in English.

Loot-Link AdBlock Message Remover

Removes adblock message.

// ==UserScript==
// @name         Loot-Link AdBlock Message Remover
// @name:ru      Удалитель Сообщения "Отключите блокировщик рекламы"
// @name:uk      Видалитель Повідомлення "Вимкніть блокувальник реклами"
// @description:ru         Удаляет сообщение "Отключите блокировщик рекламы" на Loot-Link.
// @description:uk         Видаляє повідомлення "Вимкніть Блокувальник реклами" на Loot-Link.
// @namespace    https://pastebin.com/PqXMmyBS
// @version      1.0
// @description  Removes adblock message.
// @match        *://loot-link.com/*
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    function removeUnwantedElements() {
        // Remove any <span> elements that contain the adblock warning text.
        document.querySelectorAll('span').forEach(span => {
            if (span.textContent && span.textContent.includes("Please disable your Adblocker in order to continue.")) {
                span.remove();
            }
            // Remove any <span> element that contains the refresh prompt.
            if (span.textContent && span.textContent.includes("Click") && span.textContent.includes("HERE")) {
                span.remove();
            }
        });

        // Remove any <div> element that contains both unwanted messages.
        document.querySelectorAll('div').forEach(div => {
            if (
                div.innerHTML &&
                div.innerHTML.includes("Please disable your Adblocker in order to continue.") &&
                div.innerHTML.includes("Click") &&
                div.innerHTML.includes("HERE")
            ) {
                div.remove();
            }
        });

        // Remove the container <div> by matching its exact inline style.
        const containerStyle = "position: relative; flex-direction: column; display: flex; padding: 50px; justify-content: center; align-items: center; border-radius: 20px; background-color: rgba(185, 184, 184, 0.6); border: 2px solid rgb(167, 166, 169); backdrop-filter: blur(10px); min-width: 32vw;";
        document.querySelectorAll('div').forEach(div => {
            if (div.getAttribute("style") === containerStyle) {
                div.remove();
            }
        });

        // Remove the fixed overlay <div> by matching its exact inline style.
        const overlayStyle = "inset: 0px; position: fixed; box-shadow: rgb(0, 0, 0) 2px 0px 5px 0px; display: flex; z-index: 2147483647; justify-content: center; align-items: center; background: rgba(76, 76, 76, 0.76);";
        document.querySelectorAll('div').forEach(div => {
            if (div.getAttribute("style") === overlayStyle) {
                div.remove();
            }
        });
    }

    // Run removal function as soon as possible and when the DOM is loaded.
    window.addEventListener('DOMContentLoaded', removeUnwantedElements);
    removeUnwantedElements();

    // Use a MutationObserver to catch dynamically added elements.
    const observer = new MutationObserver(() => {
        removeUnwantedElements();
    });
    observer.observe(document.body, { childList: true, subtree: true });
})();