[Premium] Shortlink Maker by Andrewblood

Automatic click the buttons for much Shortlink sites (a list is no longer possible with so many pages)

// ==UserScript==
// @name         [Premium] Shortlink Maker by Andrewblood
// @namespace    https://greasyfork.org/users/1162863
// @version      1.7.3
// @description  Automatic click the buttons for much Shortlink sites (a list is no longer possible with so many pages)
// @author       Andrewblood
// @match        *://*/*
// @exclude      *challenges.cloudflare.com/*
// @require      https://cdn.jsdelivr.net/npm/tesseract.js@4.0.2/dist/tesseract.min.js
// @icon         https://coinfinity.top/favicon.ico
// @grant        window.close
// @grant        window.focus
// @grant        GM_openInTab
// @license      Copyright Andrewblood
// ==/UserScript==
/*

How to use:

It clicks automatic all Shortlink sites from Firefaucet and on Dutchycorp it makes the sites that have a Feedback over 5 Points.
When an Error appears it closes the site.

Tesseract is used for recognising the number captcha on some sites.

I never whan't to add a Advertise or Analyse or anything to this script! (How a other prominent script maker)
Only some Referal links and code for automatic integrate the referal in the URL,

*/
(function() {
    'use strict';

    const titles = [
        'Just a moment',
        '稍等片刻',
        'Een ogenblik',
        'Un instant',
        'Nur einen Moment',
        'Un momento',
        'Um momento',
        'Bir an'
    ];

    if (titles.some(title => document.title.includes(title))) {
        console.log('Cloudflare-Challenger-Seite erkannt. Skript wird nicht ausgeführt.');
        window.focus();
    } else {

        function specialClick(selector) {
            const interval001 = setInterval(function() {
                const button = document.querySelector(selector);
                const captchaElement = document.querySelector(".captcha-modal, .g-recaptcha, .h-captcha, #captcha_container, #captcha-holder");
                const captchaResponse = document.querySelector("#g-recaptcha-response, [name='h-captcha-response']");

                if (captchaElement) {
                    if (captchaResponse && captchaResponse.value.length > 0 && button && button.offsetHeight > 0 && !button.hasAttribute('disabled') && !button.disabled) {
                        clearInterval(interval001);
                        console.log("Click: " + button.innerText);
                        setTimeout(() => {
                            button.click();
                        }, 2000);
                    }
                } else {
                    if (button && button.offsetHeight > 0 && !button.hasAttribute('disabled') && !button.disabled) {
                        clearInterval(interval001);
                        console.log("Click: " + button.innerText);
                        setTimeout(() => {
                            button.click();
                        }, 2000);
                    }
                }
            }, 500);
        }

        function searchFirstButtonWithInnerText(text) {
            let interval = setInterval(function() {
                let buttons = document.querySelectorAll('button');
                for (let button of buttons) {
                    if (button && button.innerText.includes(text) && button.offsetHeight > 0 && !button.hasAttribute('disabled') && !button.disabled) {
                        clearInterval(interval);
                        console.log("Click: " + button.innerText);
                        setTimeout(() => {
                            button.click();
                        }, 2000);
                    }
                }
            }, 500);
        }

        // All
        if (window.location.href.includes("adlink.click") ||
            window.location.href.includes("mitly.us") ||
            window.location.href.includes("linkpay.top") ||
            window.location.href.includes("gamezizo.com") ||
            window.location.href.includes("mrproblogger.com") ||
            window.location.href.includes("urlspay.com") ||
            window.location.href.includes("wordcounter.icu") ||
            window.location.href.includes("tfly.link") ||
            window.location.href.includes("urlcut.pro") ||
            window.location.href.includes("adrev.link") ||
            window.location.href.includes("cutlink.xyz") ||
            window.location.href.includes("dutchycorp.space/shp2") ||
            window.location.href.includes("dutchycorp.space/shp-smart") ||
            window.location.href.includes("revcut.net") ||
            window.location.href.includes("clik.si") ||
            window.location.href.includes("droplink.co") ||
            window.location.href.includes("atglinks.com")){
            specialClick(".btn.get-link:not(.disabled)"); // Get Link
        }

        // Ouo
        if (window.location.href.includes("ouo.press") ||
            window.location.href.includes("ouo.io")){
            setTimeout(function () {
                specialClick("#btn-main:not(.disabled)");
            }, 3000);
        }

        // ClksPro
        if (window.location.href.includes("financewrapper.net") ||
            window.location.href.includes("fishingbreeze.com") ||
            window.location.href.includes("recipes4all.net")){
            setInterval(function () {
                if (document.querySelector("#click") && document.querySelector("#click").offsetHeight > 0 && document.querySelector("#click").innerText.includes("Ad")){
                    location.reload();
                }
            }, 500);
            searchFirstButtonWithInnerText("Continue ");
        }

        // Clicksfly
        if (window.location.href.includes("mythvista.com") ||
            window.location.href.includes("ss7.info") ||
            window.location.href.includes("vocalley.com") ||
            window.location.href.includes("yogablogfit.com") ||
            window.location.href.includes("healthfirstweb.com") ||
            window.location.href.includes("sololevelingmanga.pics") ||
            window.location.href.includes("howifx.com")){
            specialClick("#scroll > a > p");
            specialClick("#getlink");
        }
        if (window.location.href.includes("clk.kim") ||
            window.location.href.includes("dekhe.click")){
            const skipAdButton = ("#sads > div > div:nth-child(3) > div > div > a");
            setTimeout(function () {
                if (document.querySelector(skipAdButton)) specialClick(skipAdButton);
            }, 22000);
            document.querySelector(".btn.btn-primary.btn-captcha").removeAttribute("disabled");
            specialClick(".btn.btn-primary.btn-captcha");
        }

        // Cuty
        if (window.location.href.includes("cety.app")){
            specialClick("#submit-button");
            let interval = setInterval(function() {
                let element = document.querySelector("#submit-button:not(.disabled)");
                if (element) {
                    element.click();
                    clearInterval(interval);
                }
            }, 500);
        }

        // CBShort/UrlsPay
        if (window.location.href.includes("crazyblog.in") ||
            window.location.href.includes("tensailab.com") ||
            window.location.href.includes("videolyrics.in") ||
            window.location.href.includes("droplink") ||
            window.location.href.includes("game5s.com") ||
            window.location.href.includes("ez4short") ||
            window.location.href.includes("tech5s.co") ||
            window.location.href.includes("wp2hostt.com") ||
            window.location.href.includes("famousdokan.com")){
            specialClick(".py-2.px-4");
            specialClick(".btn-success:not(.disabled)");
            specialClick("#go_d");
            specialClick("#go_d2");
            specialClick(".btn-primary.btn.submitBtn:not(.disabled)");
            specialClick("#t_modal_close_x");
            let interval = setInterval(function() {
                let element = document.querySelectorAll(".py-2.px-4")[1];
                if (element) {
                    element.click();
                    clearInterval(interval);
                }
            }, 500);
        }

        // Magnet + 1bitSpace
        if (window.location.href.includes("mgnet.xyz") ||
            window.location.href.includes("1bitspace.com") ||
            window.location.href.includes("1bit.space")){
            specialClick("#continue-button");
            specialClick(".button.is-rounded.is-fullwidth.is-outlined.is-link.rubberBand.animated.button-element-verification");
            specialClick("#container-element-verification > div > button");
        }

        // FcLc
        if (window.location.href.includes("fc-lc.xyz") ||
            window.location.href.includes("fitdynamos.com") ||
            window.location.href.includes("labgame.io") ||
            window.location.href.includes("gamezizo.com")){
            specialClick("#invisibleCaptchaShortlink");
            specialClick(".btn.btn-primary.btn-captcha.mb-4");
            specialClick("#next");
            specialClick("#scroll");
            specialClick("#glink");
            specialClick("#surl");
            specialClick(".btn.btn-sm.btn-success.m-2:not(.disabled)");
        }

        // Cut-Urls
        if (window.location.href.includes("exego.app") ||
            window.location.href.includes("falpus.com")){
            specialClick(".button.link-button:not(.disabled)");
        }

        // ClkSh/LinkPay/Pay.inc
        if (window.location.href.includes("oii.la") ||
            window.location.href.includes("blogtechh.com") ||
            window.location.href.includes("wptohost.com")||
            window.location.href.includes("blogsward.com") ||
            window.location.href.includes("linkpay.top") ||
            window.location.href.includes("coinjest.com") ||
            window.location.href.includes("raiseinfo.top")){
            specialClick(".btn.btn-primary.btn-captcha");
            specialClick("#scroll > a > p");
            specialClick("#begin-button");
            specialClick("#continueBtn");
            specialClick(".btn.btn-success:not(.disabled)");
            document.querySelector("body > div:nth-child(6) > div > div:nth-child(2) > div > center > iframe").focus()
            if (document.querySelector(".text-dark.text-center.mb-0").textContent.includes("5/5")) {
                const newTab = GM_openInTab("https://coinfinity.top/about.php", { active: true });

                onbeforeunload = function() {
                    newTab.close();
                };
            }
        }

        // DutchyCorp2
        if (window.location.href.includes("movies.dutchycorp.space") ||
            window.location.href.includes("anime.dutchycorp.space") ||
            window.location.href.includes("tech.dutchycorp.space") ||
            window.location.href.includes("dutchycorp.ovh/sh/") ||
            window.location.href.includes("dutchycorp.space/shp2/") ||
            window.location.href.includes("dutchycorp.space/shp-smart/") &&
            !window.location.href.includes("autofaucet")){
            if (document.querySelector("body").innerHTML.includes("cl1")){
                setTimeout(function () {
                    document.querySelector('#cl1').classList.remove('hide');
                    document.querySelector('#cl1').classList.add('show');
                }, 5000);
            }
            setInterval(function () {
                if (document.querySelector("#mainNav > div > div > div:nth-child(3) > div > div > a")) document.querySelector("#mainNav > div > div > div:nth-child(3) > div > div > a").click();
            }, 3000);
            specialClick("#proceed > font > b"); // first site Link 1
            specialClick("#cl1 > center > a > font > b"); // first site Link 2
            specialClick("#invisibleCaptchaShortlink"); // After Captcha
            specialClick("#click-btn > font"); // second site Link 1

            let interval = setInterval(function() {
                let element = document.querySelectorAll("#click-btn > font")[1]; // second site Link 2
                if (element) {
                    element.click();
                    clearInterval(interval);
                }
            }, 500);
        }

        // Fly
        if (window.location.href.includes("documentaryplanet.xyz") ||
            window.location.href.includes("substitutefor.com") ||
            window.location.href.includes("englishwritingsite.xyz") ||
            window.location.href.includes("sleeptube.xyz") ||
            window.location.href.includes("1side.xyz") ||
            window.location.href.includes("pulse3d.xyz") ||
            window.location.href.includes("vibe21.xyz") ||
            window.location.href.includes("deskmir.com") ||
            window.location.href.includes("year21.xyz") ||
            window.location.href.includes("3zone.xyz") ||
            window.location.href.includes("bikerlynn.com") ||
            window.location.href.includes("bcsclass.com") ||
            window.location.href.includes("clk.skin")){

            window.focus();
            if (document.querySelector("#start-button")) document.querySelector("#start-button").click()
            var interval011 = setInterval(function () {
                if (document.querySelector("#skip-button") && document.querySelector("#skip-button").offsetHeight > 0){
                    clearInterval(interval011);
                    document.querySelector("#skip-button").click();
                }
            }, 1000);
            var interval010 = setInterval(function () {
                if (document.querySelector("#click") && document.querySelector("#click").offsetHeight > 0 && document.querySelector("#click").textContent.includes("You Must Click And Stay")){
                    clearInterval(interval010);
                    const newTab = GM_openInTab("https://coinfinity.top/about.php", { active: true });
                    const currentTab = window;
                    window.addEventListener("beforeunload", function () {
                        if (newTab && !newTab.closed) {
                            newTab.close();
                        }
                    });
                }
            }, 500);

            searchFirstButtonWithInnerText("Step ");
        }

        // Clik.pw
        if (window.location.href.includes("pwrpa.cc") ||
            window.location.href.includes("wordcounter.icu")){
            specialClick("#invisibleCaptchaShortlink");
            specialClick("body > div.container > div > div > div > div:nth-child(9) > a:not(.disabled)");
            specialClick("body > div.container > div > div > div > div:nth-child(10) > a:not(.disabled)");
        }

        // ShrkEarn
        if (window.location.href.includes("pi.li") ||
            window.location.href.includes("blogmystt.com") ||
            window.location.href.includes("policiesreview.com")){
            specialClick("#scroll > a > p:not(.disabled)");
            specialClick("#continue:not(.disabled)");
            specialClick(".btn.btn-success:not(.disabled)");
        }

        // LinkRex
        if (window.location.href.includes("autodime.com") ||
            window.location.href.includes("blogmystt.com")){
            specialClick("#button1");
            specialClick("body > div.container > div > div > div > div:nth-child(5) > a:not(.disabled)");
            specialClick(".btn-hover.color-1.btn-captcha");
        }

        if (window.location.href.includes("linx.cc")){
            specialClick(".get-link.color-2.btn-hover.btn:not(.disabled)");
        }


        // Adshnk
        if (window.location.href.includes("adshnk.com") ||
            window.location.href.includes("adshnk.com")){
            specialClick("#app_second_panel > div.twelve.wide.computer.eight.wide.tablet.sixteen.wide.mobile.column > div.ui.segment.basic.inverted > div > div.five.wide.column.middle.aligned.center.aligned > button");
            specialClick("#final_redirect");
        }


        // ShrinkMe/UrlsPay
        if (window.location.href.includes("shrinkme.ink") ||
            window.location.href.includes("themezon.net") ||
            window.location.href.includes("mrproblogger.com") ||
            window.location.href.includes("sharphindi.in")){
            specialClick("#invisibleCaptchaShortlink");
            specialClick("#tp-snp2");
            specialClick("#btn1");
            specialClick("#btn2");
            specialClick("#tp-generate");
            specialClick(".tp-btn-2.tp-blue");
        }

        // Mitly
        if (window.location.href.includes("mitly.us") ||
            window.location.href.includes("sonjuegosgratis.com") ||
            window.location.href.includes("mrproblogger.com")){
            specialClick(".btn.btn-primary");
            specialClick(".btn.btn-primary.btn-lg.btn-block:not(.disabled)");
        }

        // Tox
        if (window.location.href.includes("surflink.tech") ||
            window.location.href.includes("coincroco.com") ||
            window.location.href.includes("sox.link")){
            specialClick("body > center > section > div > div > div > div.hero_contents__buttons > a")
            specialClick(".btn.btn-primary.btn-lg.btn-block:not(.disabled)");
            specialClick(".btnBgRed.mt-3.mb-sm-0");
            specialClick(".btnBgRed.get-link:not(.disabled)");
            // specialClick("#fexkominhidden2 > center > button:not(.disabled)");
            setTimeout(function () {
                document.querySelector("#fexkominhidden2 > center > button").click();
            }, 16000);
        }

        // Tmearn
        if (window.location.href.includes("blogmado.com")){
            specialClick(".btn:not(.disabled)");
        }

        // PayLks/ATG
        if (window.location.href.includes("askpaccosi.com") ||
            window.location.href.includes("cryptomonitor.in") ||
            window.location.href.includes("paylinks.cloud") ||
            window.location.href.includes("2the.space") ||
            window.location.href.includes("bioinflu.com") ||
            window.location.href.includes("tfly.link") ||
            window.location.href.includes("skillheadlines.in") ||
            window.location.href.includes("atglinks.com") ||
            window.location.href.includes("mealcold.com")){
            if (document.querySelector(".adblock_title")){
                document.querySelector(".adblock_title").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.remove();
            }
            specialClick("#invisibleCaptchaShortlink"); // Open ad 30 secvonds
            specialClick("#openButton"); // Open ad 30 secvonds
            specialClick("#interstitial-container > h4 > button");
            specialClick("#wpsafe-link > a > img");
            specialClick("#wpsafelinkhuman > img");
            specialClick("#wpsafelink-landing > button"); // After Ad and Captcha
            specialClick("#wpsafe-generate > a > img"); // button at top
            specialClick("#wpsafe-link > a > button"); // Done at top
            specialClick("#openButton"); // Open ad 30 secvonds
        }

        // RSS
        if (window.location.href.includes("softwaredetail.com") ||
            window.location.href.includes("hostingdetailer.com") ||
            window.location.href.includes("loansdetails.com") ||
            window.location.href.includes("tradingfact4u.com") ||
            window.location.href.includes("travellingdetail.com") ||
            window.location.href.includes("insurancesfact.com")){

            setTimeout(function () {
                const modal = document.querySelector("#close-anchor-left");
                const anchorBottom = document.querySelector("#close-anchor-top");
                const anchorTop = document.querySelector("#close-anchor-right");
                const anchorLeft = document.querySelector("#close-anchor-bottom");
                const anchorRight = document.querySelector("#closeInterstitialHBai");
                if (modal) modal.click();
                if (anchorBottom) anchorBottom.click();
                if (anchorTop) anchorTop.click();
                if (anchorLeft) anchorLeft.click();
                if (anchorRight) anchorRight.click();
                console.log("Ads with .click closed");
            }, 3000);

            let interval = setInterval(function() {
                let element = document.querySelectorAll("button")[1];
                if (document.querySelector(".iconcaptcha-modal__body")) {
                    if (document.querySelector(".iconcaptcha-modal__body-title") &&
                        document.querySelector(".iconcaptcha-modal__body-title").innerHTML === 'Verification complete.') {
                        if (element) {
                            console.log(element);
                            console.log(element.onclick);
                            element.focus();
                            element.click();
                            clearInterval(interval);
                        }
                    }
                } else if (element && element.offsetHeight > 0 && !element.hasAttribute('disabled')) {
                    console.log(element);
                    console.log(element.onclick);
                    element.focus()
                    element.click();
                    clearInterval(interval);
                }
            }, 1000);

            setInterval(function () {
                if (document.querySelector("#click") && document.querySelector("#click").offsetHeight > 0){
                    location.reload();
                }
            }, 500);
        }

        // GPlinks
        if (window.location.href.includes("modapktop.net") ||
            window.location.href.includes("gplinks.co") ||
            window.location.href.includes("cggovtjobalert.in") ||
            window.location.href.includes("techews.in") ||
            window.location.href.includes("ubgbonline.in") ||
            window.location.href.includes("hindustanalert.in") ||
            window.location.href.includes("chinakingoakgrove.com") ||
            window.location.href.includes("ipotrend.in") ||
            window.location.href.includes("nokrivibhag.in") ||
            window.location.href.includes("sabkiyojana.com") ||
            window.location.href.includes("songlyrics.in.net")){
            specialClick("#VerifyBtn");
            specialClick(".NextBtn:not(.disabled)");
            specialClick("#captchaButton:not(.disabled)");
        }

        // document.getElementById('watchAdBtn').style.display = 'block';

        // ClickSi
        if (window.location.href.includes("virtuous-tech") ||
            window.location.href.includes("clik.si")){

            var continueButton = document.querySelector(".btn.btn-lg.btn-primary.mb-2 > span");
            var redX = document.querySelector("#ad > svg");

            // specialClick(".btn.btn-success.btn-lg.get-link")
            // specialClick(".btn.btn-lg.btn-primary.mb-2:not(.disabled)");k:not(.disabled)");

            var interval001 = setInterval(function() {
                if (continueButton && continueButton.textContent == ("0") && document.querySelector(".form-control").value.length > 0) {
                    clearInterval(interval001);
                    continueButton.click();
                    setTimeout(() => {
                        redX.click();
                    }, 3000);

                }

                if (document.title == "Done"){
                    window.focus();
                }

            }, 500);

            if (document.querySelector("#clickMessage") && document.querySelector("#clickMessage").innerText.includes("Click any ad")){
                clearInterval(interval001);
                const newTab = GM_openInTab("https://coinfinity.top/about.php", { active: true });
                const currentTab = window;

                setTimeout(() => {
                    currentTab.focus();
                }, 20000);

                window.addEventListener("beforeunload", function () {
                    if (newTab && !newTab.closed) {
                        newTab.close();
                    }
                });
            }

            // Captcha-Bild finden
            let captchaImage = document.querySelector(".input-group-prepend");
            if (captchaImage) {
                // Bild URL extrahieren
                let captchaSrc = captchaImage.lastElementChild.src;

                // Erstellt ein neues Canvas-Element zur Bildbearbeitung
                let canvas = document.createElement('canvas');
                let ctx = canvas.getContext('2d');

                // Lädt das Captcha-Bild
                let img = new Image();
                img.crossOrigin = "Anonymous"; // Umgehen von CORS-Problemen, falls nötig
                img.src = captchaSrc;
                img.onload = function() {
                    // Setzt die Größe des Canvas auf die Bildgröße
                    canvas.width = img.width;
                    canvas.height = img.height;

                    // Zeichnet das Bild auf das Canvas
                    ctx.drawImage(img, 0, 0);

                    // Schwellenwert-Anpassung (Thresholding)
                    let imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
                    let data = imageData.data;

                    // Schwellenwert für Bildbearbeitung (Threshold: 128)
                    let threshold = 80;
                    for (let i = 0; i < data.length; i += 4) {
                        let avg = (data[i] + data[i + 1] + data[i + 2]) / 3; // Durchschnitt der RGB-Werte
                        let value = avg < threshold ? 0 : 255;
                        data[i] = data[i + 1] = data[i + 2] = value; // Setzt R, G, B auf den Schwellenwert
                    }
                    ctx.putImageData(imageData, 0, 0); // Das bearbeitete Bild auf das Canvas anwenden

                    // Zeigt das bearbeitete Captcha-Bild rechts oben auf der Seite an
                    let processedImage = new Image();
                    processedImage.src = canvas.toDataURL(); // Erstellt eine Data-URL aus dem Canvas
                    processedImage.style.position = 'fixed';
                    processedImage.style.top = '10px';
                    processedImage.style.right = '10px';
                    processedImage.style.border = '2px solid black';
                    processedImage.style.zIndex = '1000';
                    document.body.appendChild(processedImage); // Fügt das bearbeitete Bild in den DOM ein

                    // Bereich für erkannte Zahlen und Berechnung
                    let resultDiv = document.createElement('div');
                    resultDiv.style.position = 'fixed';
                    resultDiv.style.top = '130px';
                    resultDiv.style.right = '10px';
                    resultDiv.style.backgroundColor = 'white';
                    resultDiv.style.border = '2px solid black';
                    resultDiv.style.padding = '10px';
                    resultDiv.style.zIndex = '1000';
                    document.body.appendChild(resultDiv);

                    // Bildanalyse mit Tesseract.js
                    Tesseract.recognize(
                        canvas, // Verwendet das Canvas mit dem bearbeiteten Bild
                        'eng',
                        {
                            logger: info => console.log(info)
                        }
                    ).then(({ data: { text } }) => {
                        console.log('Erkannte Captcha-Zahlen:', text.trim());

                        // Versuch, die erkannten Zeichen als "Zahl + Zahl" zu finden
                        let match = text.trim().match(/(\d+)\s*\+\s*(\d+)/);
                        if (match) {
                            // Wenn "Zahl + Zahl" erkannt wurde
                            let zahl1 = parseInt(match[1], 10);
                            let zahl2 = parseInt(match[2], 10);

                            // Addition durchführen
                            let ergebnis = zahl1 + zahl2;
                            console.log(`Berechnung: ${zahl1} + ${zahl2} = ${ergebnis}`);

                            // Anzeige der erkannten Zahlen und der Berechnung
                            resultDiv.innerHTML = `<strong>Erkannte Zahlen:</strong> ${zahl1} + ${zahl2}<br><strong>Ergebnis:</strong> ${ergebnis}`;

                            // Formularfeld für Captcha finden und Ergebnis einfügen
                            let captchaInput = document.querySelector(".form-control");
                            if (captchaInput) {
                                captchaInput.value = ergebnis; // Ergebnis der Addition einfügen
                            }
                        }
                        // Fallback: Wenn drei Zahlen erkannt wurden, die mittlere als Pluszeichen interpretieren
                        else {
                            let fallbackMatch = text.trim().match(/(\d+)\s*(\d+)\s*(\d+)/);
                            if (fallbackMatch) {
                                let zahl1 = parseInt(fallbackMatch[1], 10);
                                let zahl2 = parseInt(fallbackMatch[2], 10); // Mittlere Zahl wird ignoriert/als Plus interpretiert
                                let zahl3 = parseInt(fallbackMatch[3], 10);

                                // Addition der ersten und dritten Zahl
                                let ergebnis = zahl1 + zahl3;
                                console.log(`Berechnung: ${zahl1} + ${zahl3} = ${ergebnis}`);

                                // Anzeige der erkannten Zahlen und der Berechnung
                                resultDiv.innerHTML = `<strong>Erkannte Zahlen:</strong> ${zahl1} + ${zahl3}<br><strong>Ergebnis:</strong> ${ergebnis}`;

                                // Formularfeld für Captcha finden und Ergebnis einfügen
                                let captchaInput = document.querySelector(".form-control");
                                if (captchaInput) {
                                    captchaInput.value = ergebnis; // Ergebnis der Addition einfügen
                                }
                            } else {
                                resultDiv.innerHTML = "Fehler: Kein gültiges Captcha-Format erkannt.";
                                console.error('Fehler: Kein gültiges Captcha-Format erkannt.');
                                location.reload();
                            }
                        }
                    });
                };
            }
        }


        // Radio
        if (window.location.href.includes("dailytech-news.eu") ||
            window.location.href.includes("crypto-radio.eu")){
            var fuckButton = document.querySelector("#verify");
            var fuckButton2 = document.querySelector(".btn.btn-success.btn-lg.get-link:not(.disabled)");
            setTimeout(function() {
                document.querySelector("#verify").style.display="block"
                fuckButton.click();
            }, 3000);

            specialClick("#verify");

            var interval002 = setInterval(function() {
                if (fuckButton){
                    fuckButton.click();
                    clearInterval(interval002);
                }
            }, 500);
        }

        // Adlink
        if (window.location.href.includes("maqal360.com") ||
            window.location.href.includes("diudemy.com")){
            specialClick("#append > a");
            specialClick("#_append > a");
            if (document.querySelector("#div-1709818067721_vo6u2yjqp > div > div:nth-child(2)")) document.querySelector("#div-1709818067721_vo6u2yjqp > div > div:nth-child(2)").click();
            if (document.querySelectorAll(".closableContainer")[1]) document.querySelectorAll(".closableContainer")[1].click();
            if (document.querySelector('.ad_iteam')) document.querySelector('.ad_iteam').remove();
            if (document.querySelector('.blog__body')) document.querySelector('.blog__body').remove();


            if (document.querySelector(".alertAd.alert.alert-primary")){

                const newTab = GM_openInTab("https://coinfinity.top/about.php", { active: true });
                const currentTab = window;

                setTimeout(() => {
                    currentTab.focus();
                    setTimeout(() => {
                        newTab.focus();
                    }, 3000);
                }, 1000);

                window.addEventListener("beforeunload", function () {
                    if (newTab && !newTab.closed) {
                        newTab.close();
                        console.log('Neuer Tab wurde geschlossen.');
                    }
                });
            }
        }

        // Faho/Bitad
        if (window.location.href.includes("coingraph.us") ||
            window.location.href.includes("infonerd.org")){
            specialClick("#redirectButton");
            // specialClick("#click");
            // specialClick('[role="button"]');
        }

        if (window.location.href.includes("google.com/url?q=https://") ||
            window.location.href.includes("facebook.com/flx/warn/")){
            specialClick("a");
        }

        // RevCut/UrlCut/CutLink
        if (window.location.href.includes("writeprofit.org") ||
            window.location.href.includes("horoscop.info") ||
            window.location.href.includes("trendzilla.club") ||
            window.location.href.includes("article24.online") ||
            window.location.href.includes("docadvice.eu")){

            specialClick("#wpsafe-generate > a");
            specialClick("#wpsafelinkhuman");
            specialClick("#\\33  > center > a");


            setInterval(function () {
                const modal = document.querySelector("#close-anchor-left");
                const anchorBottom = document.querySelector("#close-anchor-top");
                const anchorTop = document.querySelector("#close-anchor-right");
                const anchorLeft = document.querySelector("#close-anchor-bottom");
                const anchorRight = document.querySelector("#closeInterstitialHBai");
                const bbm = document.querySelector(".bbm-close");
                const anchor = document.querySelector(".avp-close-floating-button.avp-button.avp-fade-enter-done");
                const bottomAd = document.querySelector("body > div.st-adunit.st-adunit-tagged.st-reset.st-show.goku.inScreen > div > div > div:nth-child(3) > svg > path:nth-child(1)")
                if (bottomAd) bottomAd.click()
                const elementA = document.querySelector(".a");
                const elementAA = document.querySelector(".aa");
                const elementB = document.querySelector(".b");
                const elementC = document.querySelector(".c");
                const elementD = document.querySelector(".d");
                const elementE = document.querySelector(".e");
                if (modal) modal.click();
                if (anchorBottom) anchorBottom.click();
                if (anchorTop) anchorTop.click();
                if (anchorLeft) anchorLeft.click();
                if (anchorRight) anchorRight.click();
                if (bbm) bbm.click();
                if (anchor) anchor.click();
                //if (elementA) elementA.remove();
                //if (elementAA) elementAA.remove();
                //if (elementB) elementB.remove();
                //if (elementC) elementC.remove();
                //if (elementD) elementD.remove();
                //if (elementE) elementE.remove();
            }, 1000);

            var interval004 = setInterval(function() {
                if (document.querySelector("#plan1 > center > h3 > font") && document.querySelector("#plan1 > center > h3 > font").textContent.includes("CLICK ON") && document.querySelector("#plan1 > center > h3 > font").offsetHeight > 0){
                    clearInterval(interval004);
                    const newTab = GM_openInTab("https://coinfinity.top/about.php", { active: true });
                    const currentTab = window;

                    setTimeout(() => {
                        currentTab.focus();
                        setTimeout(() => {
                            newTab.focus();
                            setTimeout(() => {
                                currentTab.focus();
                                document.querySelector("#plan2").style.display = "block";
                            }, 7000);
                        }, 5000);
                    }, 3000);

                    window.addEventListener("beforeunload", function () {
                        if (newTab && !newTab.closed) {
                            newTab.close();
                        }
                    });
                }
            }, 5000);
        }

        // RSFly
        if (window.location.href.includes("retrotechreborn.com")){
            setTimeout(() => {
                window.assDidCkeDone = true;
                document.querySelector('#scrolltocbt').classList.add("is-hidden");
                document.querySelector('#checkclick').classList.remove("is-hidden");
                specialClick("#cbt");
                console.log("Ad click bypass");
            }, 35000);
            specialClick("#youtubeStepIframe");
            specialClick("#ytcontinueButton");
        }

        // Foary
        if (window.location.href.includes("forex-trnd.com")){
            setTimeout(() => {
                document.querySelector("#exfoary-form > input.g-recaptcha.btn.btn-primary").click()
            }, 5000);
            specialClick(".btn.btn-primary:not(.disabled)");
        }

        // Shortit
        if (window.location.href.includes("shortit.pw")){

            var goToLinkButton = document.querySelector(".btn.btn-primary.pulse")
            /*
            setTimeout(function () {
                const modal = document.querySelector("#ccnsad-pop");
                const anchorBottom = document.querySelector(".ACpw_slide.ACpw_animated");
                const anchorTop = document.querySelector(".table-responsive");
                const anchorLeft = document.querySelector(".col-6.col-md-3.float-left.float-md-right.text-center");
                const anchorRight = document.querySelector(".col-6.col-md-3.float-left.float-md-left.text-center");
                if (modal) modal.remove();
                if (anchorBottom) anchorBottom.remove();
                if (anchorTop) anchorTop.remove();
                if (anchorLeft) anchorLeft.remove();
                if (anchorRight) anchorRight.remove();
                console.log("Ads with .click closed");
            }, 3000);
            */
            if (document.querySelector("#btn1")) document.querySelector("#btn1").click();
            if (document.querySelector("#btn2")) document.querySelector("#btn2").click();
            specialClick("#btn1");
            specialClick("#btn2");

            setInterval(function () {
                if (goToLinkButton && goToLinkButton.innerText.includes("Got to")){
                    var url = goToLinkButton.href
                    window.location.href = url
                }
            }, 1000);
        }


        // Lksfly/Chaininfo
        if (window.location.href.includes("playonpc.online") ||
            window.location.href.includes("linksfly.me") ||
            window.location.href.includes("quins.us") ||
            window.location.href.includes("bitcosite.com")){
            var asdf = setInterval(function() {
                if (document.querySelector("#aaoii2o") && document.querySelector("#aaoii2o").textContent == 'Get Link') {
                    clearInterval(asdf);
                    specialClick("#aaoii2o:not(.disabled)");
                }
                if (document.querySelector("#cbt") && document.querySelector("#cbt").textContent == "Next article") {
                    clearInterval(asdf);
                    specialClick("#cbt:not(.disabled)");
                }
            }, 2000);

            var interval003 = setInterval(function() {
                if (document.querySelector("#formButtomMessage") && document.querySelector("#formButtomMessage").innerText == 'Waiting for ad click!') {
                    clearInterval(interval003);
                    const newTab = GM_openInTab("https://coinfinity.top/about.php", { active: true });
                    const currentTab = window;

                    setTimeout(() => {
                        currentTab.focus();
                    }, 15000);

                    window.addEventListener("beforeunload", function () {
                        if (newTab && !newTab.closed) {
                            newTab.close();
                        }
                    });
                }
            }, 500);
        }

        // CPM
        if (window.location.href.includes("finedieats.com") ||
            window.location.href.includes("cpm.icu")){
        }

        // Teamearn
        if (window.location.href.includes("cryptowidgets.net") ||
            window.location.href.includes("cpm.icu")){
            const element = document.querySelector("#clickMessage");

            if (element && element.style.display === "block") {
                console.log("Das Element ist sichtbar.");
                const newTab = GM_openInTab("https://coinfinity.top/about.php", { active: true });
                const currentTab = window;

                setTimeout(() => {
                    currentTab.focus();
                }, 12000);

                window.addEventListener("beforeunload", function () {
                    if (newTab && !newTab.closed) {
                        newTab.close();
                    }
                });
            }

        }
    }

})();