Greasy Fork is available in English.

Lootlabs Bypasser { - Working - }

Bypasses lootlabs links! https://discord.gg/eonhub

// ==UserScript==
// @name         Lootlabs Bypasser { - Working - }
// @namespace    https://discord.gg/eonhub
// @version      1.3
// @description  Bypasses lootlabs links! https://discord.gg/eonhub
// @author       @voidyyy0
// @icon         https://yt3.googleusercontent.com/9MMsOBq3-7HKkD9UjcPS2Fp8EALosHlMUTRXp4Vdu5jtK4Svwtb55cuGYVehbWQyAmZLjfE0Wg8=s176-c-k-c0x00ffffff-no-rj
// @license      GPL { - No Copying - }
// @match        https://loot-link.com/s?*
// @match        https://loot-links.com/s?*
// @match        https://lootlink.org/s?*
// @match        https://lootlinks.co/s?*
// @match        https://lootdest.info/s?*
// @match        https://lootdest.org/s?*
// @match        https://lootdest.com/s?*
// @match        https://links-loot.com/s?*
// @grant        none
// ==/UserScript==

function decodeURI(encodedString, prefixLength = 5) {
    let decodedString = '';
    const base64Decoded = atob(encodedString);
    const prefix = base64Decoded.substring(0, prefixLength);
    const encodedPortion = base64Decoded.substring(prefixLength);

    for (let i = 0; i < encodedPortion.length; i++) {
        const encodedChar = encodedPortion.charCodeAt(i);
        const prefixChar = prefix.charCodeAt(i % prefix.length);
        const decodedChar = encodedChar ^ prefixChar;
        decodedString += String.fromCharCode(decodedChar);
    }

    return decodedString;
}

(function() {
    'use strict';

    const waitForElementAndModifyParent = () => {
        const modifyParentElement = (targetElement) => {
            const parentElement = targetElement.parentElement;

            if (parentElement) {
                const images = document.querySelectorAll('img');
                let countdownSeconds = 60;

                for (let img of images) {
                    if (img.src.includes('eye.png')) {
                        countdownSeconds = 13;
                        break;
                    } else if (img.src.includes('bell.png')) {
                        countdownSeconds = 30;
                        break;
                    } else if (img.src.includes('apps.png') || img.src.includes('fire.png')) {
                        countdownSeconds = 60;
                        break;
                    } else if (img.src.includes('gamers.png')) {
                        countdownSeconds = 90;
                        break;
                    }
                }

                parentElement.innerHTML = '';

                const popupHTML = `
                    <div id="tm-overlay" style="position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.75); z-index:999999; display:flex; justify-content:center; align-items:center;">
                        <center>
                            <div id="tm-popup" style="padding:40px; background:#fff; border-radius:5px; box-shadow:0 2px 10px rgba(0,0,0,0.5); z-index:1000000;">
                                <div style="margin-bottom:20px;"><h1>Please wait,</h1><h2>hamsters are working hard in the background to bypass..</h2></div>
                                <div class="wheel-and-hamster" role="img" aria-label="Orange and tan hamster running in a metal wheel">
                                    <div class="wheel"></div>
                                    <div class="hamster"><div class="hamster__body"><div class="hamster__head"><div class="hamster__ear"></div><div class="hamster__eye"></div><div class="hamster__nose"></div></div><div class="hamster__limb hamster__limb--fr"></div><div class="hamster__limb hamster__limb--fl"></div><div class="hamster__limb hamster__limb--br"></div><div class="hamster__limb hamster__limb--bl"></div><div class="hamster__tail"></div></div></div>
                                    <div class="spoke"></div>
                                </div>
                                <br>
                                <div id="countdown" style="margin-bottom:20px;"><h4>(Estimated ${countdownSeconds} seconds remaining..)</h4></div>
                                <div id="countdown" style="margin-bottom:20px;"><h4>(Minimum wait time due to the server returning the URL.)</h4></div>
                            </div>
                        </center>
                    </div>
                `;

                const startCountdown = (duration) => {
                    let remaining = duration;
                    const countdownTimer = setInterval(() => {
                        remaining--;
                        document.getElementById('countdown').textContent = `(Estimated ${remaining} seconds remaining..)`;
                        if (remaining <= 0) clearInterval(countdownTimer);
                    }, 1000);
                };

                const spinnerCSS = `
                    .wheel-and-hamster {
                        --dur: 1s;
                        position: relative;
                        width: 12em;
                        height: 12em;
                        margin: auto;
                    }
                    /* Rest of spinner CSS removed for brevity */
                `;

                parentElement.insertAdjacentHTML('afterbegin', popupHTML);

                startCountdown(countdownSeconds);

                const style = document.createElement('style');
                style.type = 'text/css';
                style.innerHTML = spinnerCSS;
                document.getElementsByTagName('head')[0].appendChild(style);
            }
        };

        const observer = new MutationObserver((mutationsList, observer) => {
            for (const mutation of mutationsList) {
                if (mutation.type === 'childList') {
                    const foundElement = Array.from(document.querySelectorAll('body *')).find(element => element.textContent.includes("UNLOCK CONTENT"));
                    if (foundElement) {
                        modifyParentElement(foundElement);
                        observer.disconnect();
                        break;
                    }
                }
            }
        });

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

    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', waitForElementAndModifyParent);
    } else {
        waitForElementAndModifyParent();
    }
})();

(function() {
    const originalFetch = window.fetch;
    window.fetch = function(url, config) {
        if (url.includes(`${INCENTIVE_SYNCER_DOMAIN}/tc`)) {
            return originalFetch(url, config).then(response => {
                if (!response.ok) return JSON.stringify(response);

                return response.clone().json().then(data => {
                    let urid = "";
                    let task_id = "";
                    let action_pixel_url = "";

                    data.forEach(item => {
                        urid = item.urid;
                        task_id = 54;
                        action_pixel_url = item.action_pixel_url;
                    });

                    const ws = new WebSocket(`wss://${urid.substr(-5) % 3}.${INCENTIVE_SERVER_DOMAIN}/c?uid=${urid}&cat=${task_id}&key=${KEY}`);

                    ws.onopen = () => setInterval(() => ws.send('0'), 1000);

                    ws.onmessage = event => {
                        if (event.data.includes('r:')) {
                            PUBLISHER_LINK = event.data.replace('r:', '');
                        }
                    };

                    navigator.sendBeacon(`https://${urid.substr(-5) % 3}.${INCENTIVE_SERVER_DOMAIN}/st?uid=${urid}&cat=${task_id}`);

                    fetch(action_pixel_url);

                    fetch(`https://${INCENTIVE_SYNCER_DOMAIN}/td?ac=1&urid=${urid}&&cat=${task_id}&tid=${TID}`);

                    ws.onclose = () => window.location.href = decodeURIComponent(decodeURI(PUBLISHER_LINK));

                    return new Response(JSON.stringify(data), {
                        status: response.status,
                        statusText: response.statusText,
                        headers: response.headers
                    });
                });
            });
        }

        return originalFetch(url, config);
    };
})();