Nobitafc - Crypto V2

Autoshorts!

// ==UserScript==
// @name         Nobitafc - Crypto V2
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Autoshorts!
// @author       Frohike

// @match        https://nobitafc.com/*



// @icon         https://www.google.com/s2/favicons?sz=64&domain=nobitafc.com
// @license      MIT
// @grant        none

// ==/UserScript==

(function() {
    'use strict';
    var mensagemAlvo = "A timeout occurred";
    var urlRedirecionamento = "https://nobitafc.com/*";
    if (document.body.innerText.includes(mensagemAlvo)) {
        window.location.href = urlRedirecionamento;
    }
    var messageDiv = document.createElement('div');
    messageDiv.style.position = 'fixed';
    messageDiv.style.top = '100px'; // Alterado para 20px para o canto superior
    messageDiv.style.left = '20px';
    messageDiv.style.padding = '10px';
    messageDiv.style.backgroundColor = 'red';
    messageDiv.style.color = 'white';
    messageDiv.style.borderRadius = '5px';
    messageDiv.style.zIndex = '9999';
    messageDiv.textContent = 'Nobitafc - Crypto V2';
    document.body.appendChild(messageDiv);

   //if (window.location.href.includes("xxxxxxxxxxxxxxx")) {
  if(window.location.href=="https://nobitafc.com/links"){
       window.onload = function() {

  // Sayaç ve yapımcı bilgisi için bir div oluşturma
     var counterDiv = document.createElement('div');
      counterDiv.id = 'counterDiv';
      counterDiv.style.position = 'fixed';
      counterDiv.style.top = '100px';
      counterDiv.style.right = '10px';
      counterDiv.style.padding = '10px';
      counterDiv.style.backgroundColor = 'black';
      counterDiv.style.color = 'white';
      counterDiv.style.fontSize = '20px';
      counterDiv.style.zIndex = '1000';
      document.body.appendChild(counterDiv);
   var countdown = 10;  // 1 dakikadan geriye doğru say
   var countdownInterval = setInterval(function() {
           counterDiv.innerHTML = 'Time remaining: ' + countdown + 's<br>Frohike';
            countdown--;
            if (countdown < 0) {
                clearInterval(countdownInterval);
                //location.reload();  // Sayfa yenileme
            }
        }, 1000);
    };
   }

 function RedirigeShortLinks() {
    if (window.location.href === 'https://nobitafc.com/dashboard') {
       window.location.href = 'https://nobitafc.com/links';
    }
  }
  setInterval(RedirigeShortLinks, 15000);

 function clicarComDelay() {
        setTimeout(function() {
            var botao = document.querySelector('a.btn.btn-primary.waves-effect.waves-light');
            if (botao) {
              botao.click();
            } else {
                console.log('Botão não encontrado.');
            }
        }, 10000);
    }
    clicarComDelay();


// Modulo  Cloudflare
  function checkCloudflareCaptchaSolved() {
        if (document.querySelector('.cf-turnstile') || document.querySelector('#captcha-turnstile')) {
            return window.turnstile.getResponse().length !== 0;
        }
        return true;
  }

  function verificarCAPTCHA() {
    const texto = "Antibot Captcha";
       if (document.body.innerText.includes(texto) &&  checkCloudflareCaptchaSolved()) {
          clickByText("Go");
        }
    }
  setInterval(verificarCAPTCHA, 5000);

//fin del modulo Cloudflare

// Agregar Enlaces Validos
    var palavrasChave = ["xxxxxxxxxxx",
                        "crypto",
                        "xxxxxxxxxxx",
                        ];

    function contemPalavraChave(elemento, palavrasChave) {
        for (var i = 0; i < palavrasChave.length; i++) {
            if (elemento.textContent.includes(palavrasChave[i])) {
                return true;
            }
        }
        return false;
    }
    function removerElementosPorPalavraChave() {
        var elementos = document.querySelectorAll('div[class="col-lg-3"]'); // Aqui se pone la class
        elementos.forEach(function(elemento) {
            if (!contemPalavraChave(elemento, palavrasChave)) {
                elemento.remove();
            }
        });
    }
    removerElementosPorPalavraChave();
// Fin de Agregar Enlaces Validos

  function clickByText(text) {
        const interval = setInterval(function() {
            const captchaElement = document.querySelector(".captcha-modal, #captchaShortlink, .h-captcha, #captcha-holder, #g-recaptcha, .h-captcha.resolved"); // .g-recaptcha nicht wegen cutynow button
            const captchaResponse = document.querySelector("[name='h-captcha-response'], #g-recaptcha-response, .g-recaptcha-response, #recaptcha-token");
            const clickableElements = document.querySelectorAll('button, a, input[type="button"], input[type="submit"]');
            for (let button of clickableElements) {
                if (button && button.innerText && button.innerText === text && button.offsetHeight > 0 && !button.hasAttribute('disabled') && !button.disabled) {
                    if (captchaElement && captchaElement.offsetHeight > 0) {
                        captchaElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
                        if (captchaResponse && captchaResponse.value.length > 0) {
                            console.log("Captcha ausgefüllt gefunden. Klicke: " + button.innerText);
                            clearInterval(interval);
                            setTimeout(() => {
                                button.click();
                            }, 3000);
                            return;
                        } else {
                            console.log("Captcha gefunden, warte auf Lösung...");
                        }
                    } else {
                        console.log("Kein Captcha gefunden. Klicke: " + button.innerText);
                        clearInterval(interval);
                        button.click();
                        return;
                    }
                }
            }
        }, 2000);
    }

})();