JUST TESTING CODE

try to take over the world!

// ==UserScript==
// @name         JUST TESTING CODE
// @namespace    http://tampermonkey.net/
// @version      13
// @description  try to take over the world!
// @author       You
// @match        *://*/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=google.com
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        GM_download
// @grant        GM_addElement
// @noframes
// ==/UserScript==
const blogURL = 'bloggerpemula.pythonanywhere.com';
const rawWindow = unsafeWindow;
const cfg = {
    AutoDL: false,
    RightFCL: false,
    Prompt: false,
    BlockFC: false,
    Flickr: false,
    noAdb: false,
}
let hostRunCounter = 0;

function strBetween(str, start, end) {
    const regex = new RegExp(`(?<=${start}).*(?=${end})`, 'g');
    const matches = str.match(regex);
    return matches ? matches[0] : '';
};

function Checkvisibility(elem) {
    if (!elem.offsetHeight && !elem.offsetWidth) {
        return false;
    }
    if (getComputedStyle(elem).visibility === 'hidden') {
        return false;
    }
    return true;
}


function RSCookie(name, value = undefined, days = null) {
    if (!name) return null;

    // --- SET MODE ---
    if (value !== undefined) {
        let expires = '';
        if (typeof days === 'number') {
            const date = new Date();
            date.setTime(date.getTime() + (days * 86400000));
            expires = `; expires=${date.toUTCString()}`;
        }

        document.cookie = `${encodeURIComponent(name)}=${encodeURIComponent(value)}${expires}; path=/`;
        return true;
    }

    // --- READ MODE ---
    const cookies = document.cookie.split(';').map(c => c.trim());
    const cookie = cookies.find(c => c.startsWith(encodeURIComponent(name) + '='));
    return cookie ? decodeURIComponent(cookie.split('=')[1]) : null;
}

function setActiveElement(selector) {
    waitForElement(selector)
        .then(element => {
            const temp = element.tabIndex;
            element.tabIndex = 0;
            element.focus();
            element.tabIndex = temp;
        });
}

function captchaSolved(callback, onWait = () => {}) {
    let intervalId;
    const stopChecking = () => clearInterval(intervalId);

    // waitForElement('//*[@id='captcha-result'] and normalize-space() = 'Verified!']')
    // .then(function() {
    //     stopChecking();
    //     callback();
    // });
    const checkCaptcha = () => {
        try {
            const captcha = rawWindow.turnstile || rawWindow.hcaptcha || rawWindow.grecaptcha;
            const response = captcha.getResponse();

            if (response) {
                stopChecking();
                callback();
            }
        } catch (error) {
            onWait(stopChecking);
        }
    };

    checkCaptcha();
    intervalId = setInterval(checkCaptcha, 1000);
}

function httpListener(callback) {
    const originalOpen = XMLHttpRequest.prototype.open;
    XMLHttpRequest.prototype.open = function(method, url) {
        this.addEventListener('load', () => {
            this.method = method;
            this.url = url;
            callback(this);
        });
        originalOpen.apply(this, arguments);
    };
}

function waitForElement(selector, time = 0) {
    const findElement = () => {
        if (selector.startsWith('//')) {
            return document.evaluate(selector, document, null, 9).singleNodeValue;
        }
        return document.querySelector(selector);
    };

    return new Promise(async (resolve, reject) => {
        let element = findElement();
        if (document.contains(element)) {
            return resolve(element);
        }
        const observer = new MutationObserver(() => {
            element = findElement();
            if (document.contains(element)) {
                observer.disconnect();
                resolve(element);
            }
        });
        observer.observe(document.documentElement, {
            // attributes: true,
            childList: true,
            subtree: true,
        });
        if (time > 0) {
            await waitSec(time)
            observer.disconnect();
            reject(new Error(`Element '${selector}' not found in time.`));
        }
    })
}

function openWithReferrerPolicy(href) {
    GM_addElement(document.head, 'meta', {
        name: 'referrer',
        content: 'origin'
    })
    (GM_addElement('a', { href })).click();
}

function waitSec(s) {
    return new Promise(r => setTimeout(r, s * 1000));
}

function imporveRegex(pattern) {
    //TODO: Convert everything into an array and detect patterns in order to minimize the regex as much as possible.
}

function runIfHost(pattern, fn, ...args) {
    // const res = imporveRegex()
    // if (res.length < pattern.length) alert('found new regex '+res);
    const isMatch = new RegExp(pattern).test(location.host);
    if (!isMatch) return; //RegExp.escape

    hostRunCounter += 1;

    logger.info('Function triggered', {
        count: hostRunCounter,
        pattern,
        fn: fn.toString(),
        args
    });

    fn(...args);
}

function goTo(url, useBlog = false) {
    const target = useBlog ? `${blogURL}?BypassResults=${url}` : url;
    logger.info('goTo', {
        target
    })
    location = target
}

function createGMLogger(options = {}) {
    const logs = [];
    const maxLogs = options.maxLogs || 200;
    const gmKey = options.gmKey || 'tm_logs';

    function _saveLog(entry) {
        logs.push(entry);
        if (logs.length > maxLogs) logs.shift();
        GM_setValue(gmKey, logs);
    }

    function formatAndStoreLog(level, ...args) {
        const time = new Date().toLocaleTimeString();
        const message = args.map(arg =>
            (typeof arg === 'object' && arg !== null) ? JSON.stringify(arg) : String(arg)
        ).join(' ');
        const entry = `${location.host}: [${time}] [${level.toUpperCase()}] ${message}`;
        // Uncomment to log to console as well:
        // console[level]?.(entry);
        _saveLog(entry);
    }

    return {
        log: (...args) => formatAndStoreLog('log', ...args),
        info: (...args) => formatAndStoreLog('info', ...args),
        warn: (...args) => formatAndStoreLog('warn', ...args),
        error: (...args) => formatAndStoreLog('error', ...args),
        getLogs: () => [...(GM_getValue(gmKey, []))],
        clearLogs: () => {
            logs.length = 0;
            GM_deleteValue(gmKey);
            console.log('Logs cleared');
        }
    };
}

const logger = new createGMLogger();

async function elementRedirect(selector, attribute = 'href') {
    logger.info('elementRedirect triggered', {
        selector
    });
    const selectors = selector.split(', ');

    if (selectors.length > 1) {
        for (const sel of selectors) elementRedirect(sel, attribute);
        return;
    }

    const element = await waitForElement(selector);
    const target = element.getAttribute(attribute);
    logger.info('Redirecting to element attribute', {
        selector,
        target,
        attribute
    });
    goTo(target);
}
function parameterRedirect(url, parameters) {
    // parameters = parameters.split(','); 
    // if (parameters.every(parameter => searchParams.has(parameter)))
    if (parameters !== undefined && !queryParams.has(parameters)) return;

    const link = url.replace(/\$(.*)/, (_, p) => {
        const [paramName, queryString] = p.split(/\?/);
        const paramValue = searchParams.get(paramName);
        
        if (!paramValue) return _;

        return /([A-Za-z0-9]+=)$/.test(paramValue) 
            ? atob(paramValue) 
            : paramValue + (queryString ? '?' + queryString : '');
    });

    if (link !== url) goTo(link);
}

const referrerPolicy = (key) => queryParams.has(key) && openWithReferrerPolicy(atob(queryParams.get(key)));

async function clickSel(selector, delay = 0) {
    const events = ['mouseover', 'mousedown', 'mouseup', 'click'];
    const selectors = selector.split(', ');

    if (selectors.length > 1) {
        for (const sel of selectors) clickSel(sel, delay);
        return;
    }

    const element = await waitForElement(selector);
    if (delay > 0) {
        logger.info('wait before clicking on element', {
            delay
        });
        await waitSec(delay);
    }

    element.removeAttribute('disabled');
    element.removeAttribute('target');
    logger.info('Start clicking on element', {
        selector
    });

    events.forEach(name => {
        element.dispatchEvent(new MouseEvent(name, {
            bubbles: true,
            cancelable: true
        }));
    });
    /*
    if (element.tagName === 'FORM') {
        element.submit();
        logger.info('Form submitted', { selector });
    } else {
        logger.info('Clicked on element ', { selector });
        element.click();
    }*/
}
const queryParams = new URLSearchParams(location.search);
const currentUrl = location.href;
const scriptId = '431691';
// Any code repeated over 50 times should be moved into a separate function, or replaced with a more general function that handles most cases with minimal changes.
// Documentation should also be added, making it easier for other developers to contribute code and enabling AI to utilize both the code and the documentation to ensure proper integration with the system.
const redirectIfHost = (pattern, selector, attribute) => runIfHost(pattern, elementRedirect, selector, attribute);
const clickIfHost = (pattern, selector) => runIfHost(pattern, clickSel, selector);
const autoDownloadIfHost = (pattern, fn, ...args) => cfg.AutoDL && runIfHost(pattern, fn, ...args);
const clickAfterCaptcha = (selector) => captchaSolved(() => clickSel(selector));

function openBugReport() {
    goTo(`https://greasyfork.org/en/scripts/${scriptId}/feedback?attachLogs=1#new-script-discussion`)
}
//openBugRepeort();
runIfHost('greasyfork.org', async function() {
    const currentId = currentUrl.match(/\d+/);

    if (currentId != scriptId || !queryParams.has('attachLogs')) {
        return;
    }

    const comment = await waitForElement('.comment-entry');
    comment.value += 'Hey, these are my logs.\n' + logger.getLogs().join('\n')
})

runIfHost('.*', function() {
    if (!cfg.RightFCL) return;
    logger.info('RightFCL is Enabled');
    const events = [
        'contextmenu', 'copy', 'cut', 'paste',
        'select', 'selectstart', 'dragstart', 'drop'
    ];
    for (const eventName of events) {
        document.addEventListener(eventName, e => e.preventDefault(), true);
    }
});
runIfHost('.*', async function() {
    if (!cfg.Prompt) return;
    logger.info('Prompt handling enabled');

    // window.alert = () => {};
    // window.confirm = () => true;
    // window.prompt = () => null;
    // if (window.Notification) {
    //     Notification.requestPermission = () => Promise.resolve('denied');
    //     Object.defineProperty(window, 'Notification', {
    //         value: null,
    //         writable: false
    //     });
    // }
    const selectors = [];

    function helper(type, list) {
        const items = list.split(', ').map(item => `[${type}*='${item}']`);
        selectors.push(...items)
    }
    helper('class', 'cookie, gdpr, notice, privacy, banner, consent');
    helper('id', 'cookie, gdpr, notice, privacy, banner, consent');
    helper('role', 'dialog');
    helper('aria-label', 'cookie, consent, privacy')

    // Currently waiting for a single element; might need to change this later
    const element = await waitForElement(selectors.join(', '));
    const isBanner = element.textContent.match(/cookie|consent|tracking|gdpr|privacy|accept|agree|decline|manage|preferences/i)
    isBanner && element.remove();
})
runIfHost('.*', function() {
    if (!cfg.BlockFC) return;
    logger.info('focus handling enabled');

    // window.mouseleave = true;
    // window.onmouseover = true;
    // document.hasFocus = () => true;

    Object.defineProperty(document, 'webkitVisibilityState', {
        get: () => 'visible',
        configurable: true
    });
    Object.defineProperty(document, 'visibilityState', {
        get: () => 'visible',
        configurable: true
    });
    Object.defineProperty(document, 'hidden', {
        get: () => false,
        configurable: true
    });

    const eventOptions = {
        capture: true,
        passive: true
    };
    window.addEventListener('focus', e => e.stopImmediatePropagation(), eventOptions);
    window.addEventListener('blur', e => e.stopImmediatePropagation(), eventOptions);
})
runIfHost('.*', function() {
    if (!cfg.noAdb) return;
    logger.info('noAdb');
    const blockPattern = /(adblock(reg)?|adb(model)?|checkadblock|detect(anyadb|adblock)|justdetectadb|fuckadblock|testadblock|disable(devtools)?|devtools)/i;
    const re = new RegExp(blockPattern);
    const observer = new MutationObserver(mutations => {
        mutations.forEach(mutation => {
            mutation.addedNodes.forEach(node => {
                if (node.nodeType === 1 && /SCRIPT|IFRAME/.test(node.tagName)) {
                    const source = node.src || node.textContent || '';
                    re.test(source) && node.remove();
                }
            });
        });
    });
    observer.observe(document, { childList: true, subtree: true });
    document.querySelectorAll('script, iframe').forEach(element => {
        const source = element.src || element.textContent || '';
        re.test(source) && element.remove();
    })
})
/*
Some of the click scripts may not work because they rely on outdated selectors referencing other elements. Each such script will need to be reviewed and updated.
*/
clickIfHost('the2.link', '#get-link-btn');
clickIfHost('keeplinks.org', '#btnchange');
clickIfHost('forex-22.com', '#continuebutton');
clickIfHost('1shortlink.com', '#redirect-link');
clickIfHost('1ink.cc|cuturl.cc', '#countingbtn');
clickIfHost('1short.io', '#countDownForm');
clickIfHost('disheye.com', '#redirectForm');
clickIfHost('aysodamag.com', '#link1s-form');
clickIfHost('cryptonewssite.rf.gd', '#dynamic-button a');
clickIfHost('1bitspace.com', '.button-element-verification');
clickIfHost('cshort.org', '.timer.redirect');
clickIfHost('ac.totsugeki.com', '.btn-lg.btn-success.btn');
clickIfHost('revlink.pro', '#main-content-wrapper > button');
clickIfHost('panyhealth.com', 'form[method=\'get\']');
clickIfHost('minhapostagem.top', '#alf_continue.alf_button');
clickIfHost('(fc-lc|thotpacks).xyz', '#invisibleCaptchaShortlink');
clickIfHost('karyawan.co.id', 'button#btn.bg-blue-100.text-blue-600');
clickIfHost('yoshare.net|olhonagrana.com', '#yuidea, #btn6');
clickIfHost('slink.bid', '.btn-success.btn, #btn-generate');
clickIfHost('blog.yurasu.xyz', '#wcGetLink, #gotolink');
clickIfHost('zegtrends.com', '#cln, #bt1, #go');
clickIfHost('creditsgoal.com', '#tp-snp2, //button[normalize-space(text())=\'Continue\']');
clickIfHost('(howifx|vocalley|financerites|yogablogfit|healthfirstweb|junkyponk|mythvista|blog-myst).com|ss7.info|sololevelingmanga.pics', '#getlink')
clickIfHost(
    '(marketrook|governmentjobvacancies|swachataparnibandh|goodmorningimg|odiadance|newkhabar24|aiperceiver|kaomojihub|arkarinaukrinetwork|topgeninsurance).com|(winezones|kabilnews|myscheme.org|mpsarkarihelp|dvjobs|techawaaz).in|(biharhelp|biharkhabar).co|wastenews.xyz|biharkhabar.net',
    'a#btn7, #open-link > .pro_btn, form[name=\'dsb\'], //button[normalize-space(text())=\'Continue\']'
);
clickIfHost('ouo.(io|press)', 'button#btn-main.btn.btn-main');
clickIfHost('(keedabankingnews|aceforce2apk).com|themezon.net|healthvainsure.site|rokni.xyz|bloggingwow.store|dsmusic.in|vi-music.app', 'form[name=\'tp\'], #tp-snp2');
//It’s probably not working because the element loads later, but this can be fixed by creating a function that uses shorter text.
clickIfHost('teknoasian.com', '//button[contains(normalize-space(text()), \'Link\') or normalize-space(text())=\'Continue\' or normalize-space(text())=\'Click To Verify\']')
clickIfHost('(fourlinez|newsonnline|phonesparrow|creditcarred|stockmarg).com|(alljntuworld|updatewallah|vyaapaarguru|viralmp3.com|sarkarins).in', '#continue-show');
clickIfHost('knowiz0.blogspot.com', 'button#nextBtn');
clickIfHost('(jobmatric|carjankaari).com|techsl.online', 'form[name=\'rtg\'], #btn6');
clickIfHost('(viralxns|uploadsoon).com', '#tp-snp2.tp-blue.tp-btn, .tp-white.tp-btn');
clickIfHost('(blogsward|coinjest).com', '#continueBtn');
clickIfHost('dogefury.com|thanks.tinygo.co', '#form-continue');
clickIfHost('almontsf.com', '#nextBtn, a.btn-moobiedat');
clickIfHost('short.croclix.me|adz7short.space', '#link, input#continue, continue.button, #btn-main');
clickIfHost('techkhulasha.com|itijobalert.in', '#waiting > div > .bt-success, //button[normalize-space(text())=\'Open-Continue\']')
runIfHost('offerwall.me|ewall.biz', clickAfterCaptcha, '#submitBtn')
runIfHost('shortlinks2btc.somee.com', clickAfterCaptcha, '#btLogin');
runIfHost('playpaste.com', clickAfterCaptcha, 'button.btn');
runIfHost('jioupload.icu', clickAfterCaptcha, '#continueBtn');
runIfHost('(bnbfree|freeth|freebitco).in', clickAfterCaptcha, '#free_play_form_button');
runIfHost('revly.click|(clikern|kiddyshort|adsssy).com|mitly.us|link.whf.bz|shortex.in|(easyshort|shorturlearn).xyz', () => {
    clickAfterCaptcha('#link-view');
    clickSel('div.col-md-12 form');
});
runIfHost('(lakhisarainews|vahanmitra24).in', () => {
    clickSel('form[name=\'dsb\']');
    elementRedirect('a#btn7');
});
runIfHost('tutwuri.id|(besargaji|link2unlock).com', () => {
    clickSel('#submit-button, #btn-2, #verify > a, #verify > button');
    clickAfterCaptcha('#btn-3');
});
runIfHost('wp.thunder-appz.eu.org|blog.adscryp.com', () => {
    clickSel('form[name=\'dsb\']');
    elementRedirect('#button3 > a');
});
runIfHost('(fitnesswifi|earnmoneyyt|thardekho|dinoogaming|pokoarcade|hnablog|orbitlo|finquizy|indids|redfea|financenuz|pagalworldsong).com|(ddieta|lmktec).net|(bankshiksha|odiadjremix).in|vbnmx.online', () => {
    elementRedirect('div[id^=\'rtg-\'] > a:nth-child(1)');
    clickSel('#rtg, #rtg-snp21 .rtg_btn, #rtg-snp2, #rtg-snp21 > button');
});
runIfHost('solidcoins.net|fishingbreeze.com', () => {
    clickAfterCaptcha('form[action]');
    clickSel('mdn');
});
runIfHost('(lyricsbaazaar|ezeviral).com', () => {
    clickAfterCaptcha('#btn6');
    elementRedirect('div.modal-content a');
});
runIfHost('financemonk.net', () => {
    clickAfterCaptcha('#downloadBtnClick');
    clickSel('#dllink');
});
runIfHost('rotizer.net', clickAfterCaptcha, '//button[normalize-space(text())=\'Confirm\']');
runIfHost('lksfy.com', clickAfterCaptcha, '.get-link.btn-primary.btn');
runIfHost('(ez4mods|game5s|sharedp|fastcars1|carbikenation).com|tech5s.co|a4a.site|rcccn.in', () => {
    clickSel('div.text-center form, #go_d');
    elementRedirect('a#go_d.submitBtn.btn.btn-primary, a#go_d2.submitBtn.btn.btn-primary');
});
runIfHost('cryptorotator.website', () => {
    clickSel('#alf_continue:not([disabled]), //div[contains(@class,\'btn\') and contains(normalize-space(.),\'Click here to unlock\']');
    clickAfterCaptcha('#invisibleCaptchaShortlink');
});
runIfHost('filedm.com', async () => {
    const element = await waitForElement('#dlbutton');
    goTo(`http://cdn.directfiledl.com/getfile?id=${element.href.split('_')[1]}`);
});
runIfHost('4hi.in|(10short|animerigel|encurt4|encurtacash).com|finish.wlink.us|passivecryptos.xyz|fbol.top|kut.li|shortie.sbs|zippynest.online|faucetsatoshi.site|tfly.link|oii.si', () => {
    clickSel('#form-continue');
    clickAfterCaptcha('#link-view');
});
runIfHost('(forexrw7|forex-articles|3rabsports|fx-22|watchtheeye).com|(offeergames|todogame).online|whatgame.xyz|gold-24.net', () => {
    clickSel('.oto > a:nth-child(1)');
    elementRedirect('.oto > a');
});

autoDownloadIfHost('upload.ee', clickSel, '#d_l');
autoDownloadIfHost('f2h.io', clickSel, '.btn-success');
autoDownloadIfHost('send.now', clickSel, '#downloadbtn');
autoDownloadIfHost('dayuploads.com', clickSel, '#ad-link2');
autoDownloadIfHost('workupload.com', clickSel, '.btn-prio.btn');
autoDownloadIfHost('docs.google.com', clickSel, '#downloadForm');
autoDownloadIfHost('gofile.io', clickSel, 'button.item_download');
autoDownloadIfHost('dddrive.me', clickSel, '.btn-outline-primary');
autoDownloadIfHost('ify.ac|go.linkify.ru', unsafeWindow?.open_href);
autoDownloadIfHost('easyupload.io', clickSel, '.start-download.div');
autoDownloadIfHost('karanpc.com', clickSel, '#downloadButton > form');
autoDownloadIfHost('krakenfiles.com', clickSel, '.download-now-text');
autoDownloadIfHost('file-upload.net', clickSel, '#downbild.g-recaptcha');
autoDownloadIfHost('dbree.me', clickSel, '.center-block.btn-default.btn');
autoDownloadIfHost('rapidgator.net', clickSel, '.btn-free.act-link.link');
autoDownloadIfHost('mp4upload.com', clickSel, '#todl, form[name=\'F1\']');
autoDownloadIfHost('freepreset.net', elementRedirect, 'a#button_download');
autoDownloadIfHost('filemoon.sx', elementRedirect, 'div.download2 a.button');
autoDownloadIfHost('dropgalaxy.com', clickSel, 'button[id^=\'method_fre\']');
autoDownloadIfHost('apkadmin.com', elementRedirect, 'div.text.text-center a');
autoDownloadIfHost('drop.download', clickSel, '#method_free, .btn-download');
autoDownloadIfHost('fileresources.net', elementRedirect, 'a.btn.btn-default');
autoDownloadIfHost('megaupto.com', clickSel, '#direct_link > a:nth-child(1)');
autoDownloadIfHost('1fichier.com', clickSel, '.btn-orange.btn-general.ok, .alc');
autoDownloadIfHost('douploads.net', clickSel, '.btn-primary.btn-lg.btn-block.btn');
autoDownloadIfHost('anonymfile.com|sharefile.co|gofile.to', elementRedirect, 'a.btn-info');
autoDownloadIfHost('uploadhaven.com', clickSel, '.alert > a:nth-child(1), #form-download');
autoDownloadIfHost('takefile.link', clickSel, 'div.no-gutter:nth-child(2) > form:nth-child(1)');
autoDownloadIfHost('files.fm', clickSel, '#head_download__all-files > div > div > a:nth-child(1)');
autoDownloadIfHost('hxfile.co|ex-load.com|megadb.net', clickSel, '.btn-dow.btn, form[name=\'F1\']');
autoDownloadIfHost('turbobit.net', () => {
    elementRedirect('#nopay-btn, #free-download-file-link')
    clickAfterCaptcha('#submit');
});
autoDownloadIfHost('uploady.io', () => {
    clickAfterCaptcha('#downloadbtn');
    clickSel('#free_dwn, .rounded.btn-primary.btn', 2);
});
autoDownloadIfHost('mega4upload.net', () => {
    clickSel('input[name=mega_free]');
    clickAfterCaptcha('#downloadbtn');
});
autoDownloadIfHost('ilespayouts.com', () => {
    clickSel('input[name=\'method_free\']');
    clickAfterCaptcha('#downloadbtn');
});
autoDownloadIfHost('hitfile.net', () => {
    clickAfterCaptcha('#submit');
    clickSel('.nopay-btn.btn-grey');
    elementRedirect('#popunder2');
});
autoDownloadIfHost('up-4ever.net', () => {
    clickSel('input[name=\'method_free\'], #downLoadLinkButton');
    clickAfterCaptcha('#downloadbtn');
});
autoDownloadIfHost('up-load.io|downloadani.me', () => {
    clickSel('input[name=\'method_free\'], .btn-dow.btn', 2);
    clickAfterCaptcha('#downloadbtn');
});
autoDownloadIfHost('file-upload.org', () => {
    clickSel('button[name=\'method_free\'], .download-btn', 2);
    clickAfterCaptcha('#downloadbtn');
});
autoDownloadIfHost('mexa.sh', () => {
    clickSel('#Downloadfre, #direct_link');
    clickAfterCaptcha('#downloadbtn');
});
autoDownloadIfHost('qiwi.gg', () => {
    clickSel('button[class^=\'DownloadButton_ButtonSoScraperCanTakeThisName\']');
    elementRedirect('a[class^=\'DownloadButton_DownloadButton\']');
});
autoDownloadIfHost('sharemods.com', () => {
    clickSel('#dForm');
    elementRedirect('a#downloadbtn.btn.btn-primary');
});
autoDownloadIfHost('dailyuploads.net', () => {
    clickAfterCaptcha('#downloadbtn');
    clickSel('#fbtn1', 2);
});
autoDownloadIfHost('udrop.com', async () => {
    const element = await waitForElement('.responsiveMobileMargin > button:nth-child(1)');
    const link = /openUrl('(.*)')/.match(element.getAttribute('onclick'));
    logger.log('match result', {
        link
    });
    goTo(link);
});
autoDownloadIfHost('k2s.cc', () => {
    clickSel('.button-download-slow');
    elementRedirect('a.link-to-file');
});
autoDownloadIfHost('desiupload.co', () => {
    clickSel('.downloadbtn.btn-block.btn-primary.btn');
    elementRedirect('a.btn.btn-primary.btn-block.mb-4');
});

/*
It should work without any issues.
*/
redirectIfHost('adfoc.us', '.skip');
redirectIfHost('lanza.me', 'a#botonGo');
redirectIfHost('lolinez.com', 'p#url a');
redirectIfHost('coincroco.com|surflink.tech|cointox.net', '.mb-sm-0.mt-3.btnBgRed');
redirectIfHost('8tm.net', 'a.btn.btn-secondary.btn-block.redirect');
redirectIfHost('bestfonts.pro', '.download-font-button > a:nth-child(1)');
redirectIfHost('cpmlink.net', 'a#btn-main.btn.btn-warning.btn-lg');
redirectIfHost('noodlemagazine.com', 'a#downloadLink.downloadBtn');
redirectIfHost('mirrored.to', 'div.col-sm.centered.extra-top a, div.centerd > a');
redirectIfHost('mohtawaa.com', 'a.btn.btn-success.btn-lg.get-link.enabled');
redirectIfHost('(techleets|bonloan).xyz|sharphindi.in|nyushuemu.com', 'a#tp-snp2');
redirectIfHost('linksly.co', 'div.col-md-12 a');
redirectIfHost('surl.li|surl.gd', '#redirect-button');
runIfHost('linkbox.to', () => {
    httpListener(function(xhr) {
        if (!xhr.url.includes('api/file/detail?itemId')) {
            return;
        }
        const {
            data: {
                itemInfo
            }
        } = JSON.parse(xhr.responseText);
        goTo(itemInfo.url);
    });
});
//

clickIfHost('imagereviser.com', '.bottom_btn');
redirectIfHost('amanguides.com', '#wpsafe-link > .bt-success');
clickIfHost('stockmarg.com', '#codexa, #open-continue-btn');
redirectIfHost('(michaelemad|7misr4day).com', 'a.s-btn-f');
clickIfHost('(dramaticqueen|emubliss).com', '#notarobot.button, #btn7');
runIfHost('tempatwisata.pro', () => {
    const buttons = ['Generate Link', 'Continue', 'Get Link', 'Next'].map(text => `//button[normalize-space(text())='${text}']`);
    clickSel(buttons.join(', '));
});

runIfHost('tii.la|oei.la|iir.la|tvi.la|oii.la|tpi.li', clickAfterCaptcha, '#continue');
runIfHost('askpaccosi.com|cryptomonitor.in', clickAfterCaptcha, 'form[name=\'dsb\']')
clickIfHost('largestpanel.in|(djremixganna|financebolo|emubliss).com|(earnme|usanewstoday).club|earningtime.in', '#tp-snp2');
runIfHost('adoc.pub', () => {
    clickSel('.btn-block.btn-success.btn', 2);
    clickAfterCaptcha('.mt-15.btn-block.btn-success.btn-lg.btn');
});
runIfHost('usersdrive.com|ddownload.com', () => {
    clickAfterCaptcha('#downloadbtn');
    clickSel('.btn-download.btn', 1);
});
runIfHost('pdfcoffee.com', () => {
    clickSel('.btn-block.btn-success.btn');
    clickAfterCaptcha('.my-2.btn-block.btn-primary.btn-lg.btn');
});
clickIfHost('(zygina|jansamparks).com|(loanifyt|getknldgg).site|topshare.in|btcon.online', 'form[name=\'tp\'], #btn6');
clickIfHost('(financewada|utkarshonlinetest).com|financenova.online', '.get_btn.step_box > .btn, .get_btn a[href]');
runIfHost('(blogmado|kredilerim|insuranceleadsinfo).com', () => {
    clickAfterCaptcha('button.btn');
    elementRedirect('a.get-link.disabled a');
});
runIfHost('litecoin.host|cekip.site', () => {
    clickAfterCaptcha('#ibtn');
    clickSel('.btn-primary.btn');
});

redirectIfHost('linkforearn.com', '#shortLinkSection a');
clickIfHost('downfile.site', 'button.h-captcha, #megaurl-submit', 2);
runIfHost('shortfaster.net', () => {
    const twoMinutesAgo = Date.now() - 2 * 60 * 1000;
    localStorage.setItem('lastRedirectTime_site1', twoMinutesAgo.toString());
});
autoDownloadIfHost('doodrive.com', () => {
    clickSel('.tm-button-download.uk-button-primary.uk-button', 3);
    elementRedirect('.uk-container > div > .uk-button-primary.uk-button');
});
clickIfHost('(uploadrar|fingau|getpczone|wokaz).com|uptomega.me', '.mngez-free-download, #direct_link > a:nth-child(1), #downloadbtn');
clickIfHost('jobinmeghalaya.in', '#bottomButton, a#btn7, #wpsafelink-landing, #open-link > .pro_btn, #wpsafe-link > .bt-success');
clickIfHost('playnano.online', '#watch-link, .watch-next-btn.btn-primary.button, button.button.btn-primary.watch-next-btn');
runIfHost('aylink.co|cpmlink.pro', async () => {
    clickIfHost('.btn.btn-go, .btn-go');
    const element = await waitForElement('#main');
    const link = /window.open\('(.*)'\)/.match(element.getAttribute('onclick'));
    goTo(link);
});
redirectIfHost('sub2get.com', '#butunlock > a:nth-child(1)')
redirectIfHost('o-pro.online', '#newbutton, a.btn.btn-default.btn-sm');
// redirectIfHost('oxy\.', '.ocdsf233', 'data-source_url'); // need a more specific pattern

autoDownloadIfHost('buzzheavier.com', clickSel, '#download-link');
autoDownloadIfHost('bowfile.com', clickSel, '.download-timer > .btn--primary.btn > .btn__text');
autoDownloadIfHost('uploadev.org', () => {
    clickAfterCaptcha('#downloadbtn');
    clickSel('#direct_link > a', 2);
});
autoDownloadIfHost('megaup.net', clickSel, 'a.btn.btn-default, #btndownload');
autoDownloadIfHost('gdflix.dad', clickSel, 'a.btn.btn-outline-success');
redirectIfHost('linkspy.cc', '.skipButton');
clickIfHost('(superheromaniac|spatsify|mastkhabre|ukrupdate).com', '#tp98, #btn6, form[name=\'tp\']');
clickIfHost('(bestloansoffers|worldzc).com|earningtime.in', '#rtg, #rtg-form, .rtg-blue.rtg-btn, #rtg-snp21 > button');
clickIfHost('(exeo|exego).app|(falpus|exe-urls|exnion).com|4ace.online', '#invisibleCaptchaShortlink, #before-captcha');
runIfHost('dinheiromoney.com', () => {
    clickSel('div[id^=\'button\'] form');
    elementRedirect('div[id^=\'button\'] center a');
});
runIfHost('writedroid.eu.org|modmania.eu.org|writedroid.in', () => {
    clickSel('#shortPostLink');
    elementRedirect('#shortGoToLink');
});
autoDownloadIfHost('katfile.com', () => {
    clickAfterCaptcha('#downloadbtn');
    clickSel('#fbtn1');
    elementRedirect('#dlink');
});
runIfHost('(admediaflex|cdrab|financekita|jobydt|foodxor|mealcold|newsobjective|gkvstudy|mukhyamantriyojanadoot|thepragatishilclasses|indobo|pdfvale|templeshelp).com|(ecq|cooklike).info|(wpcheap|bitwidgets|newsamp|coinilium).net|atomicatlas.xyz|gadifeed.in|thecryptoworld.site|skyfreecoins.top|petly.lat|techreviewhub.store|mbantul.my.id', async () => {
    const element = await waitForElement('#wpsafe-link a[onclick*=\'window.open\']');
    const onclick = element.getAttribute('onclick');
    goTo(onclick.match(/window.open\('(.*)'\)/));
});
clickIfHost('setroom.biz.id|travelinian.com', 'form[name=\'dsb\'], a:nth-child(1) > button');
redirectIfHost('(g34new|dlgamingvn|v34down|phimsubmoi|almontsf).com|(nashib|timbertales).xyz', '#wpsafegenerate > #wpsafe-link > a[href]');
runIfHost('earnbee.xyz|zippynest.online|getunic.info', () => {
    localStorage.setItem('earnbee_visit_data', JSON.stringify({
        firstUrl: currentUrl,
        timestamp: Date.now() - 180000
    }));
});
runIfHost('2linkes.com', () => {
    clickAfterCaptcha('#link-view');
    clickSel('.box-body > form:nth-child(2)');
});
runIfHost('(importantclass|hamroguide).com', () => {
    clickSel('#pro-continue, #pro-link a');
    elementRedirect('#my-btn.pro_btn');
});
runIfHost('nishankhatri.xyz|(bebkub|owoanime|hyperkhabar).com', () => {
    clickSel('#pro-continue, #my-btn');
    elementRedirect('a#pro-btn');
});
clickIfHost('gocmod.com', '.download-line-title'); 
runIfHost('(travelironguide|businesssoftwarehere|softwaresolutionshere|freevpshere|masrawytrend).com', () => {
    clickAfterCaptcha('#lview > form', 'submit');
    elementRedirect('.get-link > a');
});
runIfHost('gocmod.com', parameterRedirect, '$urls');
runIfHost('api.gplinks.com', parameterRedirect, '$url');
runIfHost('rfaucet.com', parameterRedirect, '$linkAlias');
runIfHost('maloma3arbi.blogspot.com', parameterRedirect, '$link');
runIfHost('financenuz.com', parameterRedirect, 'https://financenuz.com/?web=$url');
runIfHost('thepragatishilclasses.com', parameterRedirect, 'https://thepragatishilclasses.com/?adlinkfly=$url');
runIfHost('coinilium.net', parameterRedirect, '$id');
/* not sure what the +2 is
BypassedByBloggerPemula('(inshort|youlinks|adrinolinks).in|(linkcents|nitro-link).com|clk.sh', null, 'url+2', '');
*/
runIfHost('blog.klublog.com', parameterRedirect, '$safe');
runIfHost('t.me', parameterRedirect, '$url');
runIfHost('dutchycorp.space', parameterRedirect, '$code?verif=0');
runIfHost('tiktok.com', parameterRedirect, '$target');
runIfHost('(facebook|instagram).com', parameterRedirect, '$u');
runIfHost('financedoze.com', parameterRedirect, 'https://www.google.com/url?q=https://financedoze.com', 'id');
// runIfHost('financedoze.com', () => parameterRedirect('https://www.google.com/url?q=https://financedoze.com', 'id'));
clickIfHost('forex-trnd.com', '#exfoary-form');
clickIfHost('cutnet.net|(cutyion|cutynow).com|(exego|cety).app|(jixo|gamco).online', '#submit-button:not([disabled])');
clickIfHost('alorra.com', '.single-layout-1.ast-post-format- > button');
runIfHost('socialwolvez.com', async () => {
    const url = `https://us-central1-social-infra-prod.cloudfunctions.net/linksService/link/guid/${location.pathname.substr(7)}`;
    const data = await fetch(url).then(response => response.json());
    goTo(data.link.url);
});
runIfHost('onlinetechsolution.link', async () => {
    const element = await waitForElement('input[name=newwpsafelink]');
    const data = JSON.parse(atob(element.value));
    goTo(data.linkr);
});
runIfHost('crypto-fi.net|claimcrypto.cc|xtrabits.click|(web9academy|bioinflu|bico8).com|(ourcoincash|studyis).xyz', async () => {
    const element = await waitForElement('#landing [name=\'go\']');
    const target = atob(`aH${element.value.split('aH').slice(1).join('aH')}`);
    goTo(target);
});
runIfHost('rekonise.com', async () => {
    const url = `https://api.rekonise.com/social-unlocks${location.pathname}`;
    const data = await fetch(url).then(response => response.json());
    goTo(data.url);
});
runIfHost('boost.ink', async () => {
    const html = await fetch(currentUrl).then(response => response.text());
    goTo(atob(html.split('bufpsvdhmjybvgfncqfa=\'\')[1].split(\'\'')[0]));
});

runIfHost('flickr.com', async () => {
    if (!cfg.Flickr) return;

    const photoId = currentUrl.match(/\d+/)  
    if (!photoId) return;

    const flickrSizes = {
        sq: "Square 75",
        q: "Square 150",
        t: "Thumbnail",
        s: "Small 240",
        n: "Small 320",
        w: "Small 400",
        m: "Medium 500",
        z: "Medium 640",
        c: "Medium 800",
        l: "Large 1024",
        h: "Large 1600",
        k: "Large 2048",
        "3k": "X-Large 3K",
        "4k": "X-Large 4K"
    };
    const sizesContainer = await waitForElement('.sizes');

    Object.entries(flickrSizes).forEach(([key, label]) => {
        const element = GM_addElement(sizesContainer, 'li', {
            class: 'download-size-item',
            // textContent: label
        });
        const a = GM_addElement(element, 'a', {
            href: 'javascript:void(0)',
            class: 'download-image-size'
        })
        GM_addElement(a, 'span', {
            class: 'label',
            textContent: label
        })
        element.addEventListener('click', async function() {
            const url = `https://www.flickr.com/photos/zedzap/${photoId}/sizes/${key}/`;
            const html = await fetch(url).then(response => response.text());
            const res = html.match(/<img src="https:\/\/live.staticflickr.com\/(.*)">/);
            GM_download('https://live.staticflickr.com/' + res[1], `BloggerP_${photoId}_${label}.jpeg`);
        });
    });
});

runIfHost('adtival.network', referrerPolicy, 'shortid');
runIfHost('sfl.gl|kisalt.digital', referrerPolicy, 'u');
runIfHost('(kongutoday|proappapk|hipsonyc).com', referrerPolicy, 'safe');
runIfHost('sharetext.me', () => currentUrl.includes('/redirect') && referrerPolicy('url'));
runIfHost('comohoy.com', () => currentUrl.includes('/view/out.html') && referrerPolicy('url'));
runIfHost('(ecryptly|equickle).com', async () => {
    referrerPolicy('id');
    waitForElement('#open-continue-form > input:nth-child(3)').then(e => goTo(atob(e.value)));
    clickSel('#rtg-snp2');
    const element = await waitForElement('#open-continue-btn');
    //TODO: remove the strBetween
    goTo(strBetween(element.getAttribute('onclick'), 'window.location.href=\'', '\';'));
});

runIfHost('(wellness4live|akash.classicoder).com|2the.space|inicerita.online', async () => {
    const element = await waitForElement('#landing');
    const data = JSON.parse(atob(element.newwpsafelink.value));
    goTo(data.linkr);
});
runIfHost('bigbtc.win', () => {
    clickAfterCaptcha('#claimbutn');
    if (currentUrl.includes('/bonus')) {
        clickSel('#clickhere'); 
    }
});
clickIfHost('vosan.co', '.elementor-size-lg, .wpdm-download-link');

runIfHost('enlacito.com', async () => {
    await waitSec(2);
    goTo(unsafeWindow.DYykkzwP, false);
});
runIfHost('paycut.pro', () => {
    if (currentUrl.includes('/ad/')) {
        goTo(currentUrl.replace('ad/', ''));
    }
});
// TODO: make better regex
runIfHost('bewbin.com', async () => {
    const element = await waitForElement('.wpsafe-top > script:nth-child(4)');
    goTo('https://bewbin.com?safelink_redirect=' + element.textContent.match(/window\.open\('https:\/\/bewbin\.com\?safelink_redirect=([^']+)'/));
});
runIfHost('lajangspot.web.id', async () => {
    const element = await waitForElement('#wpsafe-link > script:nth-child(2)');
    goTo('https://lajangspot.web.id?safelink_redirect=' + element.textContent.match(/window\.open\('https:\/\/lajangspot\.web\.id\?safelink_redirect=([^']+)'/));
});
//

redirectIfHost('xonnews.net|toilaquantri.com|share4u.men|camnangvay.com', 'div#traffic_result a');
runIfHost('easylink.gamingwithtr.com', () => {
    clickSel('#countdown');
    elementRedirect('a#pagelinkhref.btn.btn-lg.btn-success.my-4.px-3.text-center');
})

autoDownloadIfHost('modsbase.com', () => {
    clickSel('.download-file-btn');
    elementRedirect('#downloadbtn > a');
});

autoDownloadIfHost('mediafire.com', () => currentUrl.includes('file/') && elementRedirect('.download_link .input'));
runIfHost('ouo.io', parameterRedirect, '$s');

runIfHost('pixeldrain.com', () => currentUrl.includes('/u/') && goTo(`${currentUrl.replace('u/', '/api/file/')}?download`));
clickIfHost('exblog.jp', '//a[normalize-space(text())=\'Continue To\'], //a[normalize-space(text())=\'NEST ARTICLE\']')

runIfHost('modcombo.com', () => {
    if (currentUrl.includes('download/')) {
        elementRedirect('div.item.item-apk a');
        clickSel('a.btn.btn-submit');
    } else {
        clickSel('a.btn.btn-red.btn-icon.btn-download.br-50');
    }
});
/*
function cloneEvent(event) {
    const cloned = new event.constructor(event.type, event);
    for (const key of Object.keys(event)) {
        try {
            cloned[key] = event[key];
        } catch {}
    }
    return new Proxy(cloned, {
        get(target, prop) {
            if (prop === 'isTrusted') return true;
            return Reflect.get(target, prop);
        }
    });
}

function TrustMe() {
    const originalAddEventListener = EventTarget.prototype.addEventListener;
    EventTarget.prototype.addEventListener = function(type, listener, options) {
        if (typeof listener !== 'function') {
            return originalAddEventListener.call(this, type, listener, options);
        }
        const wrapped = function(event) {
            let cloned;
            try {
                cloned = cloneEvent(event);
            } catch (e) {
                return listener.call(this, event);
            }
            return listener.call(this, cloned);
        };
        return originalAddEventListener.call(this, type, wrapped, options);
    };
}
        BypassedByBloggerPemula(/(mdseotools|sealanebio|bihartown|tessofficial|latestjobupdate|hypicc|niveshskill|carbikeswale|eduprothink|glimmerbyte|technofreez|pagalworldlyrics|poorhindi|paisasutra|dhanyogi|thedeorianews|bgmiobb).com|(allnotes|sewdamp3.com|motahone|mukhyasamachar|techrain).in|(pisple|cirdro|panscu).xyz|taiyxd.net/, async () => {
            ReadytoClick('#age.progress-button', 2);
            ReadytoClick('#get-link', 3);
            ReadytoClick('#confirmYes', 4);
            async function handleQuiz() {
                const questionEl = bp('#question');
                if (!questionEl) return;
                const {
                    result: answer,
                    op,
                    a,
                    b
                } = BpAnswer(questionEl.textContent.trim());
                if (answer === null) return;
                let radioSelector = `input[type='radio'][name='option'][value='${answer}']`;
                let radio = bp(radioSelector);
                if (!radio && op === '/') {
                    const altAnswer = Math.round(a / b);
                    radioSelector = `input[type='radio'][name='option'][value='${altAnswer}']`;
                    radio = bp(radioSelector);
                }
                if (!radio) {
                    const options = Array.from(bp('input[type='radio'][name='option']', true)).map(r => parseInt(r.value));
                    const closest = options.reduce((p, c) => Math.abs(c - answer) < Math.abs(p - answer) ? c : p);
                    radioSelector = `input[type='radio'][name='option'][value='${closest}']`;
                    radio = bp(radioSelector);
                }
                if (!radio) {
                    BpNote('Tidak ada opsi yang valid untuk dipilih', 'error');
                    return;
                }
                ReadytoClick(radioSelector);
                await sleep(3000);
                ReadytoClick('#next-page-btn.progress-button');
            }
            await handleQuiz();
        });

        BypassedByBloggerPemula(/programasvirtualespc.net/, () => {
            if (location.href.includes('out/')) {
                const pvc = location.href.split('?')[1];
                redirect(atob(pvc), false);
            }
        });
    const elementExists = query => bp(query) !== null;
        BypassedByBloggerPemula(/(grtjobs|jksb).in/, () => {
            CheckVisibility('.step', () => {
                unsafeWindow.handleContinueClick();
            });
        });

    function fakeHidden() {
        Object.defineProperty(document, 'hidden', {
            get: () => true,
            configurable: true
        });
    }


    function SameTab() {
        Object.defineProperty(unsafeWindow, 'open', {
            value: function(url) {
                if (url) {
                    location.href = url;
                    BpNote(`Forced window.open to same tab: ${url}`);
                }
                return null;
            },
            writable: false,
            configurable: false
        });
        document.addEventListener('click', (e) => {
            const target = e.target.closest('a[target='_blank']');
            if (target && target.href) {
                e.preventDefault();
                location.href = target.href;
                BpNote(`Redirected target='_blank' to same tab: ${target.href}`);
            }
        }, true);
        document.addEventListener('submit', (e) => {
            const form = e.target;
            if (form.target === '_blank' && form.action) {
                e.preventDefault();
                location.href = form.action;
                BpNote(`Redirected form target='_blank' to same tab: ${form.action}`);
            }
        }, true);
    }

    function BpAnswer(input, mode = 'math') {
        if (mode === 'math') {
            let text = input.replace(/^(Solve:|What is)\s*i, '').replace(/[=?]/g, '').trim();
            text = text.replace(/[x×]/g, '*').replace(/÷/g, '/').replace(/\^/g, '**');
            if (text.startsWith('sqrt(')) {
                const num = parseFloat(text.match(/sqrt\((\d+\.?\d*)\)/)?.[1]);
                return {
                    result: num ? Math.floor(Math.sqrt(num)) : null,
                    op: null,
                    a: null,
                    b: null
                };
            }
            const match = text.match(/(\d+\.?\d*)\s*([+\-/%^])\s*(\d+\.?\d*)/);
            if (!match) return {
                result: null,
                op: null,
                a: null,
                b: null
            };
            const [, n1, op, n2] = match, a = parseFloat(n1), b = parseFloat(n2);
            const isRounded = text.includes('rounded to integer');
            let result;
            switch (op) {
                case '+':
                    result = a + b;
                    break;
                case '-':
                    result = a - b;
                    break;
                case '*':
                    result = a * b;
                    break;
                case '/':
                    result = isRounded ? Math.floor(a / b) : a / b;
                    break;
                case '%':
                    result = a % b;
                    break;
                case '**':
                    result = Math.pow(a, b);
                    break;
                default:
                    BpNote('Operator tidak dikenal: ' + op, 'error');
                    result = null;
            }
            return {
                result,
                op,
                a,
                b
            };
        } else if (mode === 'sum') {
            const numbers = input.replace(/\s/g, '').match(/[+\-]?(\d+\.?\d*)/g) || [];
            return numbers.reduce((sum, val) => parseFloat(sum) + parseFloat(val), 0);
        } else if (mode === 'captcha') {
            const numcode = bp('input.captcha_code');
            if (!numcode) return null;
            const digits = numcode.parentElement.previousElementSibling.children[0].children;
            return Array.from(digits).sort((d1, d2) => parseInt(d1.style.paddingLeft) - parseInt(d2.style.paddingLeft)).map(d => d.textContent).join('');
        }
        return null;
    }

    function BoostTimers(targetDelay) {
        if (CloudPS(true, true, true)) return;
        const limits = {
            setTimeout: {
                max: 1,
                timeframe: 5000,
                count: 0,
                timestamp: 0
            },
            setInterval: {
                max: 1,
                timeframe: 5000,
                count: 0,
                timestamp: 0
            }
        };

        function canLog(type) {
            const restriction = limits[type];
            const currentTime = Date.now();
            if (currentTime - restriction.timestamp > restriction.timeframe) {
                restriction.count = 0;
                restriction.timestamp = currentTime;
            }
            if (++restriction.count <= restriction.max) {
                return true;
            }
            return false;
        }
        const wrapTimer = (orig, type) => (func, delay, ...args) => orig(func, (typeof delay === 'number' && delay >= targetDelay) ? (canLog(type) && BpNote(`[BoostTimers] Accelerated ${type} from ${delay}ms to ${targetDelay}ms`), 50) : delay, ...args);
        try {
            Object.defineProperties(unsafeWindow, {
                setTimeout: {
                    value: wrapTimer(unsafeWindow.setTimeout, 'setTimeout'),
                    writable: true,
                    configurable: true
                },
                setInterval: {
                    value: wrapTimer(unsafeWindow.setInterval, 'setInterval'),
                    writable: true,
                    configurable: true
                }
            });
        } catch (e) {
            const proxyTimer = (orig, type) => new Proxy(orig, {
                apply: (t, _, a) => t(a[0], (typeof a[1] === 'number' && a[1] >= targetDelay) ? (canLog(type) && BpNote(`[BoostTimers] Accelerated ${type} from ${a[1]}ms to ${targetDelay}ms`), 50) : a[1], ...a.slice(2))
            });
            unsafeWindow.setTimeout = proxyTimer(unsafeWindow.setTimeout, 'setTimeout');
            unsafeWindow.setInterval = proxyTimer(unsafeWindow.setInterval, 'setInterval');
        }
    }

    function AIORemover(action, target = null, attributes = null) {
        switch (action) {
            case 'removeAttr':
                if (!target || !attributes) {
                    BpNote('Selector and attributes are required for removeAttr action.', 'error');
                    return;
                }
                var attrs = Array.isArray(attributes) ? attributes : [attributes];
                var validAttrs = ['onclick', 'class', 'target', 'id'];
                var invalidAttrs = attrs.filter(a => !validAttrs.includes(a));
                if (invalidAttrs.length) {
                    BpNote(`Invalid attributes: ${invalidAttrs.join(', ')}`, 'error');
                    return;
                }
                var attrElements = bp(target, true);
                if (!attrElements.length) {
                    BpNote(`No elements found for selector '${target}'`, 'error');
                    return;
                }
                attrElements.forEach(element => {
                    attrs.forEach(attr => element.removeAttribute(attr));
                });
                BpNote(`Attributes ${attrs.join(', ')} Removed`);
                break;
            default:
                BpNote('Invalid action. Use Existing Cases', 'error');
        }
    }

    BypassedByBloggerPemula(/vk.com/, () => {
        if (BpParams.has('to') && location.href.includes('/away.php')) {
            location = decodeURIComponent(BpParams.get('to'));
        }
    });
    BypassedByBloggerPemula(/triggeredplay.com/, () => {
        if (location.href.includes('#')) {
            let trigger = new URLSearchParams(window.location.hash.substring(1));
            let redplay = trigger.get('url');
            if (redplay) {
                let decodedUrl = DecodeBase64(redplay);
                window.location.href = decodedUrl;
            }
        }
    });
    BypassedByBloggerPemula(/adbtc.top/, () => {
        if (CloudPS(true, true, true)) return;
        CaptchaDone(() => {
            DoIfExists('input[class^=btn]');
        });
        let count = 0;
        setInterval(function() {
            if (bp('div.col.s4> a') && !bp('div.col.s4> a').className.includes('hide')) {
                count = 0;
                bp('div.col.s4> a').click();
            } else {
                count = count + 1;
            }
        }, 5000);
        window.onbeforeunload = function() {
            if (unsafeWindow.myWindow) {
                unsafeWindow.myWindow.close();
            }
            if (unsafeWindow.coinwin) {
                let popc = unsafeWindow.coinwin;
                unsafeWindow.coinwin = {};
                popc.close();
            }
        };
    });
    BypassedByBloggerPemula(/./, () => {
        const features = 
            key: 'SameTab',
            action: SameTab,
            log: 'SameTab'
        }, {
            key: 'TimerFC',
            action: () => BoostTimers(cfg.get('TDelay')),
            log: 'Fast Timer'
        }
    });
    BypassedByBloggerPemula(/(youtube|youtube-nocookie).com/, () => {
        Object.defineProperty(document, 'hidden', {
            value: false,
            writable: false
        });
        Object.defineProperty(document, 'visibilityState', {
            value: 'visible',
            writable: false
        });
        document.addEventListener('visibilitychange', e => e.stopImmediatePropagation(), true);
        const addDownloadButton = () => waitForEl('ytd-subscribe-button-renderer', elm => {
            if (bp('#dl-bp-button')) return;
            elm.parentElement.style.cssText = 'display: flex; align-items: center; gap: 8px';
            elm.insertAdjacentHTML('afterend', '<button id='dl-bp-button' style='background: #ff0000; color: white; border: none; padding: 8px 12px; border-radius: 2px; cursor: pointer; font-size: 13px; line-height: 18px;'>DL BP</button>');
            bp('#dl-bp-button').addEventListener('click', showDownloadDialog);
        });
        const showDownloadDialog = () => {
            if (bp('#dl-bp-dialog')) return;
            const dialog = document.createElement('div');
            dialog.id = 'dl-bp-dialog';
            const shadow = dialog.attachShadow({
                mode: 'open'
            });
            shadow.innerHTML = `<style>.dialog { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.3); z-index: 1000; width: 90%; max-width: 400px; text-align: center; }.input { width: 100%; padding: 10px; margin-bottom: 10px; border: 1px solid #ccc; border-radius: 4px; }.btns { display: flex; gap: 10px; justify-content: center; }
    .btn { background: #ff0000; color: white; border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-size: 14px; }.btn:hover { background: #cc0000; }.close { position: absolute; top: 10px; right: 10px; cursor: pointer; font-size: 20px; }</style><div class='dialog'><span class='close'>X</span><h3>Download YouTube Video or Audio</h3><input class='input' type='text' value='${location.href}'><div class='btns'><button class='btn' id='video-btn'>Video</button><button class='btn' id='audio-btn'>Audio</button></div></div>`;
            document.body.appendChild(dialog);
            shadow.querySelector('.close').addEventListener('click', () => dialog.remove());
            shadow.querySelector('#video-btn').addEventListener('click', () => startDownload(shadow.querySelector('.input').value, 'video') && dialog.remove());
            shadow.querySelector('#audio-btn').addEventListener('click', () => startDownload(shadow.querySelector('.input').value, 'audio') && dialog.remove());
        };
        const startDownload = (url, type) => {
            const videoId = url.split('v=')[1]?.split('&')[0] || url.split('/shorts/')[1]?.split('?')[0];
            if (!videoId) return BpNote('Invalid video ID', 'warn');
            const downloadUrl = type === 'video' ? `https://bloggerpemula.pythonanywhere.com/youtube/video/${videoId}` : `https://bloggerpemula.pythonanywhere.com/youtube/audio/${videoId}`;
            const a = document.createElement('a');
            a.href = downloadUrl;
            a.target = '_blank';
            a.click();
        };
        if (cfg.get('YTDown')) {
            addDownloadButton();
            document.addEventListener('yt-navigate-finish', addDownloadButton);
            document.addEventListener('yt-page-data-updated', addDownloadButton);
        }
        if (cfg.get('YTShort')) {
            const bypassShorts = () => {
                if (!location.pathname.startsWith('/shorts')) return;
                const vidId = location.pathname.split('/')[2];
                if (vidId) window.location.replace(`https://www.youtube.com/watch?v=${vidId}`);
            };
            bypassShorts();
            document.addEventListener('yt-navigate-start', bypassShorts);
        }
    });
    BypassedByBloggerPemula('(cryptowidgets|melodyspot|carsmania|cookinguide|tvseriescentral|cinemascene|hobbymania|plantsguide|furtnitureplanet|petsguide|gputrends|gamestopia|ountriesguide|carstopia|makeupguide|gadgetbuzz|coinsvalue|coinstrend|coinsrise|webfreetools|wanderjourney|languagefluency|giftmagic|bitwidgets|virtuous-tech|retrocove|vaultfind|geotides|renovatehub|playallgames|countriesguide).net|(freeoseocheck|insurancexguide|funplayarcade|origamiarthub|fitbodygenius|illustrationmaster|selfcareinsights|constructorspro|ecofriendlyz|virtualrealitieshub|wiki-topia|techiephone|brewmasterly|teknoasian|lifeprovy|chownest|mythnest|homesteadfeast|gizmoera|tastywhiz|speakzyo).com|(bubblix|dailytech-news).eu|(biit|carfocus).site|coinscap.info|insurancegold.in|wii.si', TrustMe);
    const sl = (h => {
        switch (h.host) {
            case 'go.paylinks.cloud':
                if (/^\/([a-zA-Z0-9]{10,12})$/.test(h.pathname)) {
                    return 'https://paylinks.cloud/' + RegExp.$1;
                }
                break;
            case 'multiup.io':
                if (h.href.includes('/download/')) return h.href.replace('download/', 'en/mirror/');
                break;
            case 'modsfire.com':
                if (/^\/([^\/]+)/.test(h.pathname)) {
                    return 'https://modsfire.com/d/' + RegExp.$1;
                }
                break;
            case 'social-unlock.com':
                if (/^\/([^\/]+)/.test(h.pathname)) {
                    return 'https://social-unlock.com/redirect/' + RegExp.$1;
                }
                break;
            case 'work.ink':
                if (/^\/([^\/]+)/.test(h.pathname)) {
                    return 'https://adbypass.org/bypass?bypass=' + location.href.split('?')[0];
                }
                break;
            case 'www.google.com':
                if (h.pathname === '/url' && h.searchParams.has('q')) {
                    return h.searchParams.get('q');
                } else if (h.pathname === '/url' && h.searchParams.has('url')) {
                    return h.searchParams.get('url');
                }
                break;
            default:
                break;
        }
    })(new URL(location.href));
    if (sl) {
        location.href = sl;
    }
        const bas = (h => {
            const b = h.pathname === '/verify/' && /^\?([^&]+)/.test(h.search);
            const result = {
                isNotifyNeeded: false,
                redirectDelay: 0,
                link: undefined
            };
            switch (h.host) {
                case 'gamezigg.com':
                    if (b) {
                        meta('https://get.megafly.in/' + RegExp.$1);
                    }
                    break;
                case 'shrs.link':
                case 'shareus.io':
                    if (/^\/old\/([^\/]+)/.test(h.pathname)) {
                        return 'https://jobform.in/?link=' + RegExp.$1;
                    }
                    break;
                default:
                    break;
            }
        })(new URL(location.href));
        if (bas) {
            const {
                isNotifyNeeded,
                redirectDelay,
                link
            } = bas;
            if (isNotifyNeeded) {
                notify(`Please Wait You Will be Redirected to Your Destination in @ Seconds , Thanks`);
            }
            setTimeout(() => {
                location.href = link;
            }, redirectDelay * 1000);
        }
        BypassedByBloggerPemula(/render-state.to/, () => {
            SameTab();
            if (BpParams.has('link')) {
                unsafeWindow.goToLink();
            }
        });
           
        autoDownloadIfHost('oydir.com', () => {
            if (elementExists('.download-now')) {
                unsafeWindow.triggerFreeDownload();
                waitForElm('.text-center.download-now > .w-100.btn-blue.btn', oydir => redirect(oydir.href));
            }
        });
        BypassedByBloggerPemula(/apkw.ru/, () => {
            if (location.href.includes('/away')) {
                let apkw = location.href.split('/').slice(-1);
                redirect(atob(apkw));
            }
        });
        BypassedByBloggerPemula(/(devnote|formshelp|rcccn).in|djbassking.live/, () => {
            CheckVisibility('.top.step', () => {
                DoIfExists('#getlinks.btn', 2);
            });
        });

        BypassedByBloggerPemula(/4fnet.org/, () => {
            if (location.href.includes('/goto')) {
                let fnet = location.href.split('/').slice(-1);
                redirect(atob(fnet), false);
            }
        });
   
        BypassedByBloggerPemula(/fansonlinehub.com/, async function() {
            setInterval(() => {
                window.scrollBy(0, 1);
                window.scrollTo(0, -1);
                ReadytoClick('.active.btn > span');
            }, 3 * 1000);
        });
        BypassedByBloggerPemula(/(financenube|mixrootmods|pastescript|trimorspacks).com/, () => {
            waitForElm('#wpsafe-link a', cdr => redirect(strBetween(cdr.onclick.toString(), `window.open('`, `', '_self')`), false));
        });
        BypassedByBloggerPemula(/mboost.me/, () => {
            if (elementExists('#firstsection')) {
                let mbo = bp('#__NEXT_DATA__');
                let mbm = JSON.parse(mbo.textContent).props.pageProps.data.targeturl;
                setTimeout(() => {
                    redirect(mbm, false);
                }, 2 * 1000);
            }
        });
        BypassedByBloggerPemula(/(aduzz|tutorialsaya|baristakesehatan|merekrut).com|deltabtc.xyz|bit4me.info/, () => {
            waitForElm('div[id^=wpsafe] > a[rel=nofollow]', tiny => redirect(strBetween(tiny.onclick.toString(), `window.open('`, `', '_self')`), false));
        });

        BypassedByBloggerPemula(/newassets.hcaptcha.com/, async function() {
            if (!cfg.get('hCaptcha')) return;
            await sleep(2000);
            ReadytoClick('#checkbox');
        });
        BypassedByBloggerPemula(/flamebook.eu.org/, async () => {
            const flame = ['#button1', '#button2', '#button3'];
            for (const fbook of flame) {
                await sleep(3000);
                ReadytoClick(fbook);
            }
        });
        BypassedByBloggerPemula(/autodime.com|cryptorex.net/, () => {
            CaptchaDone(() => {
                DoIfExists('#button1');
            });
            elementReady('#fexkominhidden2').then(() => ReadytoClick('.mb-sm-0.mt-3.btnBgRed', 2));
        });
        BypassedByBloggerPemula(/(bchlink|usdlink).xyz/, () => {
            AIORemover('removeAttr', '#antiBotBtnBeta', 'onclick');
            DoIfExists('#antiBotBtnBeta > strong', 2);
            CaptchaDone(() => {
                DoIfExists('#invisibleCaptchaShortlink');
            });
        });
        BypassedByBloggerPemula(/pubghighdamage.com|anmolbetiyojana.in/, () => {
            SameTab();
            DoIfExists('#robot', 2);
            DoIfExists('#notarobot.button', 2);
            ReadytoClick('#gotolink.bt-success.btn', 3);
        });
        BypassedByBloggerPemula(/jobzhub.store/, () => {
            DoIfExists('#surl', 5);
            if (elementExists('#next')) {
                unsafeWindow.startCountdown();
                DoIfExists('form.text-center', 'submit', 15);
            }
        });
        BypassedByBloggerPemula(/curto.win/, () => {
            DoIfExists('#get-link', 2);
            CheckVisibility('span:contains('Your link is ready')', () => {
                let curto = bp('#get-link').href;
                redirect(curto);
            });
        });
        BypassedByBloggerPemula(/infonerd.org/, () => {
            CheckVisibility('#redirectButton', '||', 'bp('#countdown').innerText == '0'', () => {
                unsafeWindow.redirectToUrl();
            });
        });
        BypassedByBloggerPemula(/yitarx.com/, () => {
            if (location.href.includes('enlace/')) {
                let yitar = location.href.split('#!')[1];
                let arxUrl = DecodeBase64(yitar, 3);
                redirect(arxUrl);
            }
        });
        BypassedByBloggerPemula(/videolyrics.in/, () => {
            ReadytoClick('a:contains('Continue')', 3);
            CheckVisibility('button[class^='py-2 px-4 font-semibold']', () => {
                DoIfExists('div[x-html='isTCompleted'] button');
            });
        });
        BypassedByBloggerPemula(/(tmail|labgame).io|(gamezizo|fitdynamos).com/, () => {
            DoIfExists('#surl', 5);
            if (elementExists('#next')) {
                DoIfExists('form.text-center', 'submit', 3);
                DoIfExists('#next', 2);
                DoIfExists('#glink', 15);
            }
        });

        BypassedByBloggerPemula(/coinsrev.com/, () => {
            parent.open = BpBlock();
            CaptchaDone(() => {
                DoIfExists('#wpsafelinkhuman > input');
            });
            DoIfExists('#wpsafe-generate > a > img', 3);
            DoIfExists('input#image3', 13);
        });
        BypassedByBloggerPemula(/indobo.com/, () => {
            const scriptElement = bp('#wpsafegenerate > script:nth-child(4)');
            if (scriptElement) {
                const scriptContent = scriptElement.textContent;
                const url = strBetween(scriptContent, 'window.location.href = '', '';', true);
                if (url && url.startsWith('https://indobo.com?safelink_redirect=')) {
                    setTimeout(() => redirect(url), 2000);
                }
            }
        });
        BypassedByBloggerPemula(/techxploitz.eu.org/, () => {
            CheckVisibility('#hmVrfy', () => {
                DoIfExists('.pstL.button', 2);
            });
            CheckVisibility('#aSlCnt', () => {
                DoIfExists('.pstL.button', 2);
                ReadytoClick('.safeGoL.button', 3);
            });
        });

        BypassedByBloggerPemula(/(financedoze|topjanakri|stockbhoomi).com|techhype.in|getpdf.net|cryptly.site/, () => {
            CheckVisibility('p:contains('Step')', () => {
                DoIfExists('#rtg', 'submit', 3);
                DoIfExists('button:innerText('Open-Continue')', 4);
            });
        });
        BypassedByBloggerPemula(/mazen-ve3.com/, () => {
            let maze = setInterval(() => {
                if (bp('.filler').innerText == 'Wait 0 s') {
                    clearInterval(maze);
                    ReadytoClick('#btn6');
                    ReadytoClick('.btn-success.btn', 1);
                }
            }, 2 * 1000);
        });
        BypassedByBloggerPemula(/dataupload.net/, async () => {
            if (!cfg.get('AutoDL')) {
                BpNote('Auto Download Feature Not Yet Activated!');
                return;
            }
            await sleep(5000);
            ReadytoClick('.downloadbtn');
        });
        BypassedByBloggerPemula(/servicemassar.ma/, () => {
            CaptchaDone(() => {
                unsafeWindow.linromatic();
            });
            CheckVisibility('button:contains('Click here')', () => {
                DoIfExists('button:innerText('Next')', 2);
                DoIfExists('button:innerText('Redirect')', 2);
            });
        });
        BypassedByBloggerPemula(/upfion.com/, () => {
            if (!cfg.get('AutoDL')) {
                BpNote('Auto Download Feature Not Yet Activated!');
                return;
            }
            if (elementExists('.file-main.form-main')) {
                DoIfExists('.my-2.text-center > .btn-primary.btn', 2);
                CaptchaDone(() => {
                    DoIfExists('#link-button');
                });
            }
        });
        BypassedByBloggerPemula(/m.flyad.vip/, () => {
            waitForElm('#captchaDisplay', (display) => {
                const number = display.textContent.trim();
                waitForElm('#captchaInput', (input) => {
                    input.value = number;
                    waitForElm('button[onclick='validateCaptcha()']', (button) => {
                        sleep(1000).then(() => button.click());
                    }, 15, 1);
                }, 15, 1);
            }, 15, 1);
        });
        BypassedByBloggerPemula(/(tejtime24|drinkspartner|sportswordz|newspute).com|(raftarsamachar|gadialert|jobinmeghalaya|raftarwords).in/, () => {
            window.scrollTo(0, 9999);
            DoIfExists('#topButton.pro_btn', 2);
            DoIfExists('#bottomButton', 3);
            ReadytoClick('#open-link > .pro_btn', 4);
        });
        BypassedByBloggerPemula(/downloader.tips/, () => {
            CaptchaDone(() => {
                DoIfExists('button.btn.btn-primary');
            });
            let downloader = setInterval(() => {
                if (bp('#count').innerText == '0') {
                    clearInterval(downloader);
                    DoIfExists('.btn-primary.btn');
                }
            }, 1 * 1000);
        });
        BypassedByBloggerPemula(/trangchu.news|downfile.site|(techacode|expertvn|ziggame|gamezigg).com|azmath.info|aztravels.net|handydecor.com.vn/, () => {
            AIORemover('removeAttr', '#monetiza', 'onclick');
            CheckVisibility('#monetiza', () => {
                ReadytoClick('#monetiza.btn-primary.btn');
            });
            elementReady('#monetiza-generate').then(() => setTimeout(() => {
                unsafeWindow.monetizago();
            }, 3 * 1000));
        });
        BypassedByBloggerPemula(/anonym.ninja/, () => {
            if (!cfg.get('AutoDL')) {
                BpNote('Auto Download Feature Not Yet Activated!');
                return;
            }
            if (location.href.includes('download/')) {
                var fd = window.location.href.split('/').slice(-1)[0];
                redirect(`https://anonym.ninja/download/file/request/${fd}`);
            }
        });
        BypassedByBloggerPemula(/(carbikesupdate|carbikenation).com/, () => {
            parent.open = BpBlock();
            CheckVisibility('#verifyBtn', () => {
                DoIfExists('#getLinkBtn', 2);
            });
            CheckVisibility('.top.step', () => {
                DoIfExists('#getlinks.btn', 2);
            });
        });
        BypassedByBloggerPemula(/firefaucet.win/, () => {
            ReadytoClick('button:innerText('Continue')', 2);
            ReadytoClick('button:innerText('Go Home')', 2);
            CaptchaDone(() => {
                waitForElm('button[type=submit]:not([disabled]):innerText('Get Reward')', (element) => {
                    ReadytoClick('button[type=submit]:not([disabled])', 1);
                }, 10, 1);
            });
        });
        BypassedByBloggerPemula(/drive.google.com/, () => {
            if (!cfg.get('AutoDL')) {
                BpNote('Auto Download Feature Not Yet Activated!');
                return;
            }
            var dg = window.location.href.split('/').slice(-2)[0];
            if (window.location.href.includes('drive.google.com/file/d/')) {
                redirect(`https://drive.usercontent.google.com/download?id=${dg}&export=download`, false).replace('<br />', '');
            } else if (window.location.href.includes('drive.google.com/u/0/uc?id')) {
                DoIfExists('#download-form', 'submit', 1);
            }
        });

        BypassedByBloggerPemula('(on-scroll|diudemy|maqal360).com', () => {
            if (elementExists('.alertAd')) {
                notify('BloggerPemula : Try to viewing another tab if the countdown does not work');
            }
            ReadytoClick('#append a', 2);
            ReadytoClick('#_append a', 3);
            elementReady('.alertAd').then(function() {
                setActiveElement('[data-placement-id='revbid-leaderboard']');
                fakeHidden();
            });
        });

        BypassedByBloggerPemula(/(down.fast-down|down.mdiaload).com/, () => {
            if (!cfg.get('AutoDL')) {
                BpNote('Auto Download Feature Not Yet Activated!');
                return;
            }
            elementReady('input.btn-info.btn').then(() => DoIfExists('input[name='method_free']', 2));
            elementReady('.lft.filepanel').then(() => ReadytoClick('a:innerText('Download')', 2));
            const captchaCode = BpAnswer(null, 'captcha');
            if (captchaCode) {
                const captchaInput = bp('input.captcha_code');
                if (captchaInput) {
                    captchaInput.value = captchaCode;
                    ReadytoClick('button:innerText('Create Download')', 30);
                }
            }
        });
        BypassedByBloggerPemula(/(horoscop|videoclip|newscrypto).info|article24.online|writeprofit.org|docadvice.eu|trendzilla.club|worldwallpaper.top/, () => {
            CaptchaDone(() => {
                unsafeWindow.wpsafehuman();
            });
            CheckVisibility('center > .wpsafelink-button', () => {
                DoIfExists('center > .wpsafelink-button', 1);
            });
            CheckVisibility('#wpsafe-generate > a', '||', 'bp('.base-timer').innerText == '0:00'', () => {
                unsafeWindow.wpsafegenerate();
                if (location.href.includes('article24.online')) {
                    DoIfExists('#wpsafelink-landing > .wpsafelink-button', 1);
                } else {
                    DoIfExists('#wpsafelink-landing2 > .wpsafelink-button', 1);
                }
            });
        });
        BypassedByBloggerPemula(/(hosttbuzz|policiesreview|blogmystt|wp2hostt|advertisingcamps|healthylifez|insurancemyst).com|clk.kim|dekhe.click/, () => {
            DoIfExists('button.btn.btn-primary', 2);
            AIORemover('removeAttr', '.btn-captcha.btn-primary.btn', 'onclick');
            DoIfExists('#nextpage', 'submit', 2);
            DoIfExists('#getmylink', 'submit', 3);
            CaptchaDone(() => {
                DoIfExists('.btn-captcha.btn-primary.btn');
            });
        });
        BypassedByBloggerPemula(/exactpay.online|neverdims.com|sproutworkers.co/, () => {
            let $ = unsafeWindow.jQuery;
            window.onscroll = BpBlock();
            unsafeWindow.check2();
            if (elementExists('#verify')) {
                $('.blog-details').text('Please Answer the Maths Questions First ,Wait until Progress bar end, then Click the Red X Manually');
                elementReady('[name='answer']').then(function(element) {
                    element.addEventListener('change', unsafeWindow.check3);
                });
            }
        });
        BypassedByBloggerPemula(/(tinybc|phimne).com|(mgame|sportweb|bitcrypto).info/, () => {
            elementReady('#wpsafe-link a[onclick*='handleClick']').then((link) => {
                const onclick = link.getAttribute('onclick');
                const urlMatch = onclick.match(/handleClick\('([^']+)'\)/);
                if (urlMatch && urlMatch[1]) {
                    const targetUrl = urlMatch[1];
                    sleep(5000).then(() => redirect(targetUrl));
                }
            });
        });
        BypassedByBloggerPemula(/inshortnote.com/, () => {
            let clickCount = 0;
            const maxClicks = 7;

            function clickElement() {
                if (clickCount >= maxClicks) {
                    BpNote('I'm tired of clicking, I need a break');
                    return;
                }
                let element = bp('#htag > [style='left: 0px;']') || bp('#ftag > [style='left: 0px;']');
                if (element) {
                    element.click();
                    clickCount++;
                    return;
                }
                for (let el of bp('.gaama [style*='left:']', true)) {
                    if (/^[a-zA-Z0-9]{5,6}$/.test(el.textContent.trim())) {
                        el.click();
                        clickCount++;
                        return;
                    }
                }
            }
            const intervalId = setInterval(() => {
                clickElement();
                if (clickCount >= maxClicks) clearInterval(intervalId);
            }, 3000);
        });

        BypassedByBloggerPemula(/jioupload.com/, () => {
            function calculateAnswer(text) {
                const parts = text.replace('Solve:', '').replace(/[=?]/g, '').trim().split(/\s+/);
                const [num1, op, num2] = [parseInt(parts[0]), parts[1], parseInt(parts[2])];
                return op === '+' ? num1 + num2 : num1 - num2;
            }
            elementReady('.file-details').then(() => {
                DoIfExists('form button.btn-secondary', 'click', 2);
                waitForElm('a.btn.btn-secondary[href*='/file/']', (jiou) => redirect(jiou.href, false));
            });
            elementReady('#challenge').then((challenge) => {
                const answer = calculateAnswer(challenge.textContent);
                BpNote(`Solved captcha: ${challenge.textContent} Answer: ${answer}`);
                elementReady('#captcha').then((input) => {
                    input.value = answer;
                    elementReady('button[type='submit']').then((button) => sleep(3000).then(() => button.click()));
                });
            });
        });
        BypassedByBloggerPemula(/(mangareleasedate|sabkiyojana|teqwit|bulkpit|odiafm).com|(loopmyhub|thepopxp).shop|cryptoblast.online/, () => {
            const GPlinks = 2 / (24 * 60);
            RSCookie('set', 'adexp', '1', GPlinks);
            CheckVisibility('.VerifyBtn', () => {
                DoIfExists('#VerifyBtn', 2);
                ReadytoClick('#NextBtn', 3);
            });
            if (elementExists('#SmileyBanner')) {
                setActiveElement('[id='div-gpt-ad']');
                fakeHidden();
            }
        });
        BypassedByBloggerPemula(/bitcotasks.com/, () => {
            if (location.href.includes('/firewall')) {
                CheckVisibility('#captcha-container', '&&', 'bp('.mb-2').innerText == 'Verified'', () => {
                    DoIfExists('button:contains('Validate')');
                });
            }
            if (location.href.includes('/lead')) {
                CheckVisibility('#status .btn', () => {
                    DoIfExists('button:contains('Start View')');
                });
            }
            CheckVisibility('#captcha-container', '&&', 'bp('.mb-2').innerText == 'Verified'', () => {
                unsafeWindow.continueClicked();
            });
            CheckVisibility('.alert-success.alert', '||', 'bp('.alert-success').innerText == 'This offer was successfully'', () => {
                unsafeWindow.close();
            });
        });
        BypassedByBloggerPemula(/shortit.pw/, () => {
            if (elementExists('#captchabox')) {
                notify('IMPORTANT Note By BloggerPemula : Please Solve the Hcaptcha for Automatically , Dont Solve the Solvemedia . Regards...');
            }
            DoIfExists('.pulse.btn-primary.btn', 3);
            CaptchaDone(() => {
                DoIfExists('#btn2');
            });
        });
        BypassedByBloggerPemula(/dutchycorp.ovh|(encurt4|10short).com|seulink.digital|oii.io|hamody.pro|metasafelink.site|wordcounter.icu|pwrpa.cc|flyad.vip|seulink.online|pahe.plus|beinglink.in/, () => {
            if (cfg.get('Audio') && !/dutchycorp.ovh|encurt4.com/.test(window.location.host)) return;
            if (elementExists('.grecaptcha-badge') || elementExists('#captchaShortlink')) {
                var ticker = setInterval(() => {
                    try {
                        clearInterval(ticker);
                        unsafeWindow.grecaptcha.execute();
                    } catch (e) {
                        BpNote(`reCAPTCHA execution failed: ${e.message}`, 'error');
                    }
                }, 3000);
            }
        });
        BypassedByBloggerPemula(/(remixsounds|helpdeep|thinksrace).com|(techforu|studywithsanjeet).in|uprwssp.org|gkfun.xyz/, () => {
            DoIfExists('.m-2.btn-captcha.btn-outline-primary.btn', 2);
            DoIfExists('.tpdev-btn', 3);
            DoIfExists('#tp98 button[class^='bt']', 3);
            DoIfExists('form[name='tp']', 'submit', 3);
            DoIfExists('#btn6', 4);
            var wssp = bp('body > center:nth-child(6) > center:nth-child(4) > center:nth-child(2) > center:nth-child(4) > center:nth-child(3) > center:nth-child(4) > center:nth-child(2) > center:nth-child(4) > script:nth-child(5)');
            if (wssp) {
                var scriptContent = wssp.textContent;
                var Linkc = scriptContent.match(/var\s+currentLink\s*=\s*[''](.*?)['']/);
                if (Linkc && Linkc[1]) {
                    var CLink = Linkc[1];
                    redirect(CLink);
                } else {
                    BpNote('currentLink Not Found.');
                }
            } else {
                BpNote('Element Not Found.');
            }
        });
        BypassedByBloggerPemula(/adshnk.com|adshrink.it/, () => {
            const window = unsafeWindow;
            let adsh = setInterval(() => {
                if (typeof window._sharedData == 'object' && 0 in window._sharedData && 'destination' in window._sharedData[0]) {
                    clearInterval(adsh);
                    document.write(window._sharedData[0].destination);
                    redirect(document.body.textContent);
                } else if (typeof window.___reactjsD != 'undefined' && typeof window[window.___reactjsD.o] == 'object' && typeof window[window.___reactjsD.o].dest == 'string') {
                    clearInterval(adsh);
                    redirect(window[window.___reactjsD.o].dest);
                }
            });
        });
        BypassedByBloggerPemula(/newsminer.uno/, () => {
            const window = unsafeWindow;
            CheckVisibility('#clickMessage', '&&', 'bp('#clickMessage').innerText == 'Click any ad'', () => {
                setActiveElement('[data-placement-id='revbid-leaderboard']');
                fakeHidden();
            });
            if (elementExists('input.form-control')) {
                notify('Please Answer the Maths Questions First ,Wait until Progress bar end, then Click the Red X Manually', false, true);
                window.onscroll = BpBlock();
                window.check2();
                elementReady('[name='answer']').then(function(element) {
                    element.addEventListener('change', window.check3);
                });
            }
        });
        BypassedByBloggerPemula(/(suaurl|lixapk|reidoplacar|lapviral|minhamoto).com/, () => {
            if (!cfg.get('SameTab')) {
                SameTab();
                BpNote('SameTab activated to prevent new tabs');
            }
            waitForElm('button[type='submit']:contains('FETCH LINK')', Btn1 => Btn1.click(), 10, 2);
            waitForElm('button:contains('START')', Btn2 => Btn2.click(), 10, 2);
            waitForElm('button:contains('PULAR CAPTCHA')', Btn3 => Btn3.click(), 10, 3);
            waitForElm('button:contains('FINAL LINK')', Btn4 => Btn4.click(), 10, 2);
            CheckVisibility('button:contains('CONTINUAR')', () => {
                ReadytoClick('button:contains('CONTINUAR')');
            });
            CheckVisibility('button:contains('DESBLOQUEAR')', () => {
                ReadytoClick('button:contains('DESBLOQUEAR')');
            });
            CheckVisibility('button[type='submit']:contains('DESBLOQUEAR')', () => {
                ReadytoClick('button[type='submit']:contains('DESBLOQUEAR')');
            });
        });
        BypassedByBloggerPemula(/autofaucet.dutchycorp.space/, function() {
            let autoRoll = false;
            if (window.location.href.includes('/roll_game.php')) {
                window.scrollTo(0, 9999);
                if (!bp('#timer')) {
                    CaptchaDone(() => {
                        if (bp('.boost-btn.unlockbutton') && autoRoll === false) {
                            bp('.boost-btn.unlockbutton').click();
                            autoRoll = true;
                        }
                        CheckVisibility('#claim_boosted', () => {
                            bp('#claim_boosted').click();
                        });
                    });
                } else {
                    setTimeout(() => {
                        window.location.replace('https://autofaucet.dutchycorp.space/coin_roll.php');
                    }, 3 * 1000);
                }
            }
            if (window.location.href.includes('/coin_roll.php')) {
                window.scrollTo(0, 9999);
                if (!bp('#timer')) {
                    CaptchaDone(() => {
                        if (bp('.boost-btn.unlockbutton') && autoRoll === false) {
                            bp('.boost-btn.unlockbutton').click();
                            autoRoll = true;
                        }
                        CheckVisibility('#claim_boosted', () => {
                            bp('#claim_boosted').click();
                        });
                    });
                } else {
                    setTimeout(() => {
                        window.location.replace('https://autofaucet.dutchycorp.space/ptc/wall.php');
                    }, 3 * 1000);
                }
            }
            if (window.location.href.includes('/ptc/wall.php')) {
                var ptcwall = bp('.col.s10.m6.l4 a[name='claim']', true);
                if (ptcwall.length >= 1) {
                    ptcwall[0].style.backgroundColor = 'red';
                    let match = ptcwall[0].onmousedown.toString().match(/'href', '(.+)'/);
                    let hrefValue = match[1];
                    setTimeout(() => {
                        window.location.replace('https://autofaucet.dutchycorp.space' + hrefValue);
                    }, 3 * 1000);
                } else {
                    CheckVisibility('div.col.s12.m12.l8 center div p', () => {
                        setTimeout(() => {
                            window.location.replace('https://autofaucet.dutchycorp.space/ptc/');
                        }, 3 * 1000);
                    });
                }
            }
            if (location.href.includes('autofaucet.dutchycorp.space/ptc/')) {
                BpNote('Viewing Available Ads');
                if (elementExists('.fa-check-double')) {
                    BpNote('All Available Ads Watched');
                    setTimeout(() => {
                        window.location.replace('https://autofaucet.dutchycorp.space/dashboard.php');
                    }, 3 * 1000);
                }
                CaptchaDone(() => {
                    CheckVisibility('#submit_captcha', () => {
                        bp('button[type='submit']').click();
                    });
                });
            }
        });
        BypassedByBloggerPemula(/stly.link|(snaplessons|atravan|airevue|carribo|amalot).net|(stfly|shrtlk).biz|veroan.com/, () => {
            CaptchaDone(() => {
                ReadytoClick('button[class^=mt-4]');
                DoIfExists('button.mt-4:nth-child(2)', 3);
            });
            CheckVisibility('button[class^=rounded]', () => {
                if (!bp('.g-recaptcha') || !bp('.cf-turnstile')) {
                    DoIfExists('button[class^=rounded]', 2);
                }
            });
            CheckVisibility('button[class^=mt-4]', '&&', 'bp('.progress-done').innerText == '100'', () => {
                ReadytoClick('button[class^=mt-4]', 2);
                ReadytoClick('button.mt-4:nth-child(2)', 4);
            });
            CheckVisibility('button[class^=mt-4]', '&&', 'bp('#countdown-number').innerText == '✓'', () => {
                DoIfExists('button[class^=mt-4]', 2);
                ReadytoClick('button.mt-4:nth-child(2)', 3);
            });
        });
        BypassedByBloggerPemula(/(playonpc|yolasblog|playarcade).online|quins.us|(retrotechreborn|insurelean|ecosolardigest|finance240|2wheelslife|historyofyesterday).com|gally.shop|freeat30.org|ivnlnews.xyz/, () => {
            CaptchaDone(() => {
                DoIfExists('button#cbt.pfbutton-primary', 1);
                ReadytoClick('button#cbt.pfbutton-primary', 2);
            });
            let playonpc = setInterval(() => {
                if (!elementExists('.h-captcha') && !elementExists('.core-msg.spacer.spacer-top') && bp('#formButtomMessage').textContent == 'Well done! You're ready to continue!' && !bp('#cbt').hasAttribute('disabled')) {
                    clearInterval(playonpc);
                    DoIfExists('button#cbt.pfbutton-primary', 1);
                    ReadytoClick('button#cbt.pfbutton-primary', 2);
                }
            }, 3 * 1000);
        });
        BypassedByBloggerPemula(/(sekilastekno|miuiku|vebma|majalahhewan).com|tempatwisata.pro/, async function() {
            const window = unsafeWindow;
            const executor = async () => {
                let El = window?.livewire?.components?.components()[0];
                while (!El) {
                    await sleep(100);
                    BpNote(1);
                    El = window?.livewire?.components?.components()[0];
                }
                const payload = {
                    fingerprint: El.fingerprint,
                    serverMemo: El.serverMemo,
                    updates: [{
                        payload: {
                            event: 'getData',
                            id: 'whathappen',
                            params: [],
                        },
                        type: 'fireEvent',
                    }, ],
                };
                const response = await fetch(location.origin + '/livewire/message/pages.show', {
                    headers: {
                        'Content-Type': 'application/json',
                        'X-Livewire': 'true',
                        'X-CSRF-TOKEN': window.livewire_token,
                    },
                    method: 'POST',
                    body: JSON.stringify(payload),
                });
                const json = await response.json();
                const url = new URL(json.effects.emits[0].params[0]);
                redirect(url.href);
            };
            if (location.host === 'wp.sekilastekno.com') {
                if (elementExists('form[method='post']')) {
                    const a = bp('form[method='post']');
                    BpNote('addRecord...');
                    const input = document.createElement('input');
                    input.value = window.livewire_token;
                    input.name = '_token';
                    input.hidden = true;
                    a.appendChild(input);
                    a.submit();
                }
                if (elementExists('button[x-text]')) {
                    BpNote('getLink..');
                    executor();
                }
                return;
            }
            if (elementExists('div[class='max-w-5xl mx-auto']')) {
                BpNote('Executing..');
                executor();
            }
        });
        BypassedByBloggerPemula(/(shrinke|shrinkme)\.\w+|(paid4link|linkbulks|linclik|up4cash|smoner|atglinks|minimonetize|encurtadorcashlinks|yeifly|themesilk|linkpayu).com|(wordcounter|shrink).icu|(dutchycorp|galaxy-link).space|dutchycorp.ovh|pahe.plus|(pwrpa|snipn).cc|paylinks.cloud|oke.io|tinygo.co|tlin.me|wordcount.im|link.freebtc.my.id|get.megafly.in|skyfreeshrt.top|learncrypto.blog|link4rev.site/, () => {
            CaptchaDone(() => {
                if (/^(shrinke|shrinkme)\.\w+/.test(window.location.host)) {
                    DoIfExists('#invisibleCaptchaShortlink');
                } else {
                    DoIfExists('#link-view', 'submit');
                }
            });
        });
        BypassedByBloggerPemula(/coinclix.co|coinhub.wiki|(vitalityvista|geekgrove).net/, () => {
            let $ = unsafeWindow.jQuery;
            const url = window.location.href;
            if (url.includes('go/')) {
                notify('Reload the Page , if the Copied Key is Different', false, true);
                sleep(1000).then(() => {
                    const link = bp('p.mb-2:nth-child(2) > strong > a');
                    const key = bp('p.mb-2:nth-child(3) > kbd > code') || bp('p.mb-2:nth-child(4) > kbd > code');
                    if (link && key) {
                        const keyText = key.textContent.trim();
                        GM_setClipboard(keyText);
                        GM_setValue('lastKey', keyText);
                        GM_openInTab(link.href, false);
                    } else {
                        const p = Array.from(BpT('p')).find(p => p.textContent.toLowerCase().includes('step 1') && p.textContent.toLowerCase().includes('google'));
                        if (p) sleep(1000).then(() => {
                            const t = p.textContent.toLowerCase();
                            GM_openInTab(t.includes('geekgrove') ? 'https://www.google.com/url?q=https://geekgrove.net' : t.includes('vitalityvista') ? 'https://www.google.com/url?q=https://vitalityvista.net' : t.includes('coinhub') ? 'https://www.google.com/url?q=https://coinhub.wiki' : 'https://www.google.com/url?q=https://geekgrove.net', false);
                        });
                    }
                });
            }
            if (['geekgrove.net', 'vitalityvista.net', 'coinhub.wiki'].some(site => url.includes(site))) {
                ReadytoClick('a.btn:has(.mdi-check)', 2);
                DoIfExists('#btn_link_start', 2);
                CaptchaDone(() => {
                    DoIfExists('#btn_link_continue');
                });
                CheckVisibility('#btn_link_continue', () => {
                    if (!elementExists('.iconcaptcha-modal')) {
                        DoIfExists('#btn_link_continue');
                    } else {
                        DoIfExists('.iconcaptcha-modal__body');
                    }
                });
                CheckVisibility('.alert-success.alert-inline.alert', () => {
                    DoIfExists('#btn_lpcont');
                });
                sleep(1000).then(() => {
                    const input = bp('#link_input.form-control');
                    if (input) {
                        input.value = GM_getValue('lastKey', '');
                        sleep(1000).then(() => bp('.btn-primary.btn-ripple')?.click());
                    }
                    const observer = new MutationObserver((mutations, obs) => {
                        const codeEl = bp('.link_code');
                        if (codeEl) {
                            const code = codeEl.textContent.trim();
                            GM_setClipboard(code);
                            $('#link_result_footer > div > div').text(`The Copied Code is / Kode yang tersalin adalah: ${code} , Please Paste the Code on the coinclix.co Site Manually / Silahkan Paste Kodenya di Situs coinclix.co secara manual`);
                            obs.disconnect();
                        }
                    });
                    observer.observe(document.body, {
                        childList: true,
                        subtree: true
                    });
                });
            }
        });
        BypassedByBloggerPemula(/./, () => {
            if (CloudPS(true, true, true)) return;
            let List = ['lopteapi.com', '3link.co', 'web1s.com', 'vuotlink.vip'],
                $ = unsafeWindow.jQuery;
            if (elementExists('form[id=go-link]') && List.includes(location.host)) {
                ReadytoClick('a.btn.btn-success.btn-lg.get-link:not([disabled])', 3);
            } else if (elementExists('form[id=go-link]')) {
                $('form[id=go-link]').off('submit').on('submit', function(e) {
                    e.preventDefault();
                    let form = $(this),
                        url = form.attr('action'),
                        pesan = form.find('button'),
                        notforsale = $('.navbar-collapse.collapse'),
                        blogger = $('.main-header'),
                        pemula = $('.col-sm-6.hidden-xs');
                    $.ajax({
                        type: 'POST',
                        url: url,
                        data: form.serialize(),
                        dataType: 'json',
                        beforeSend: function(xhr) {
                            pesan.attr('disabled', 'disabled');
                            $('a.get-link').text('Bypassed by Bloggerpemula');
                            let btn = '<button class='btn btn-default , col-md-12 text-center' onclick='javascript: return false;'><b>Thanks for using Bypass All Shortlinks Scripts and for Donations , Regards : Bloggerpemula</b></button>';
                            notforsale.replaceWith(btn);
                            blogger.replaceWith(btn);
                            pemula.replaceWith(btn);
                        },
                        success: function(result, status, xhr) {
                            let finalUrl = result.url;
                            if (finalUrl.includes('swiftcut.xyz')) {
                                finalUrl = finalUrl.replace(/[?&]i=[^&]/g, '').replace(/[?]&/, '?').replace(/&&/, '&').replace(/[?&]$/, '');
                                location.href = finalUrl;
                            } else if (xhr.responseText.match(/(a-s-cracks.top|mdiskshortner.link|exashorts.fun|bigbtc.win|slink.bid|clockads.in)/)) {
                                location.href = finalUrl;
                            } else {
                                redirect(finalUrl);
                            }
                        },
                        error: function(xhr, status, error) {
                            BpNote(`AJAX request failed: ${status} - ${error}`, 'error');
                        }
                    });
                });
            }
        });
        BypassedByBloggerPemula('headlinerpost.com|posterify.net', () => {
            let dataValue = '';
            for (let script of bp('script', true)) {
                if (script.textContent.includes('data:')) {
                    dataValue = strBetween(script.textContent, 'data: '', ''', true);
                    break;
                }
            }
            let stepValue = '',
                planValue = '';
            try {
                const plan = JSON.parse(RSCookie('read', 'plan') || '{}');
                stepValue = plan.lid || '';
                planValue = plan.page || '';
            } catch {}
            if (!dataValue || !stepValue) return;
            const postData = {
                data: dataValue
            };
            const sid = RSCookie('read', 'sid');
            postData[sid ? 'step_2' : 'step_1'] = stepValue;
            if (sid) postData.id = sid;
            const isHeadliner = location.host === 'headlinerpost.com';
            const headers = {
                'Content-Type': 'application/x-www-form-urlencoded',
                'Referer': isHeadliner ? 'https://headlinerpost.com/' : 'https://posterify.net/',
                'Origin': isHeadliner ? 'https://headlinerpost.com' : 'https://posterify.net'
            };
            GM_xmlhttpRequest({
                method: 'POST',
                url: 'https://shrinkforearn.in/link/new.php',
                headers,
                data: Object.keys(postData).map(k => `${encodeURIComponent(k)}=${encodeURIComponent(postData[k])}`).join('&'),
                withCredentials: true,
                onload: ({
                    responseText
                }) => {
                    try {
                        const result = JSON.parse(responseText);
                        if (result.inserted_data?.id) {
                            RSCookie('set', 'sid', result.inserted_data.id, 10 / (24 * 60));
                        }
                        if ((result.inserted_data?.id || result.updated_data) && (sid || result.inserted_data?.id)) {
                            const ShrinkUrl = isHeadliner ? `https://posterify.net/?id=${encodeURIComponent(stepValue)}&sid=${encodeURIComponent(result.inserted_data?.id || sid)}&plan=${encodeURIComponent(planValue)}` : `https://shrinkforearn.in/${encodeURIComponent(stepValue)}?sid=${encodeURIComponent(result.inserted_data?.id || sid)}`;
                            setTimeout(() => redirect(ShrinkUrl), 3000);
                        }
                    } catch {}
                }
            });
        });
        BypassedByBloggerPemula(/(cryptosparatodos|placementsmela|howtoconcepts|tuasy|skyrimer|yodharealty|mobcupring|aiimsopd|advupdates|camdigest|heygirlish|blog4nx|todayheadliners|jobqwe|cryptonews.faucetbin|mobileflashtools).com|(paidinsurance|djstar|sevayojana|bjp.org).in|(sastainsurance|nashib).xyz|(cialisstrong|loanforuniversity).online|(cegen|thunder-appz.eu).org|zaku.pro|veganab.co|skyfreecoins.top|manga4nx.site/, () => waitForElm('#wpsafe-link a', bti => redirect(strBetween(bti.onclick.toString(), `window.open('`, `', '_self')`), false)));
        BypassedByBloggerPemula('(cryptowidgets|melodyspot|carsmania|cookinguide|tvseriescentral|cinemascene|hobbymania|plantsguide|furtnitureplanet|petsguide|gputrends|gamestopia|ountriesguide|carstopia|makeupguide|gadgetbuzz|coinsvalue|coinstrend|coinsrise|webfreetools|wanderjourney|languagefluency|giftmagic|bitwidgets|virtuous-tech).net|(freeoseocheck|insurancexguide|funplayarcade|origamiarthub|fitbodygenius|illustrationmaster|selfcareinsights|constructorspro|ecofriendlyz|virtualrealitieshub|wiki-topia|techiephone|brewmasterly).com|(bubblix|dailytech-news).eu|(biit|carfocus|blogfly).site|coinscap.info|insurancegold.in|wii.si', () => {
            CheckVisibility('#captcha-container', '&&', 'bp('.mb-2').innerText == 'Verified'', () => ReadytoClick('button:contains('Verify')', 2));
            const tano = window.location.href;
            if (['dailytech-news.eu', 'wii.si', 'bubblix.eu', 'bitwidgets.net', 'virtuous-tech.net', 'carfocus.site', 'biit.site'].some(tino => tano.includes(tino))) {
                elementReady('#loadingDiv[style*='display:block'] button, #loadingDiv[style*='display: block'] button').then(ReadytoClick.bind(this, 'button', 2));
            } else {
                CheckVisibility('#loadingDiv[style^='display'] > span', () => {
                    const buttonText = strBetween(bp('#loadingDiv[style^='display'] > span').textContent, 'Click', 'To Start', false);
                    elementReady(`#loadingDiv[style^='display'] .btn.btn-primary:contains('${buttonText}')`).then(buttonElement => {
                        const buttons = Array.from(bp('#loadingDiv[style^='display'] .btn.btn-primary', true));
                        const index = buttons.indexOf(buttonElement);
                        if (index === -1) return;
                        const selectorOptions = ['button.btn:nth-child(2)', 'button.btn:nth-child(3)', 'button.btn:nth-child(4)', 'button.btn:nth-child(5)', 'button.btn:nth-child(6)'];
                        const chosenSelector = selectorOptions[index];
                        if (chosenSelector) sleep(2000).then(() => ReadytoClick(`#loadingDiv[style^='display'] ${chosenSelector}`));
                    });
                });
            }
            elementReady('#clickMessage[style*='display: block'], clickMessage[style*='display:block']').then(() => {
                setActiveElement('[data-placement-id='revbid-leaderboard']');
                fakeHidden();
            });
        });
    }
    */