Cryptoads.in + btblog.in Auto Tool

Gabungan: Auto cryptoads.in login & klaim + auto klik tombol di btblog.in (continue, dll.)

目前為 2025-08-03 提交的版本,檢視 最新版本

在您安裝前,Greasy Fork希望您了解本腳本包含“負面功能”,可能幫助腳本的作者獲利,而不能給你帶來任何收益。

作者從這份腳本獲得佣金, 例如透過重寫連結或提供優惠券代碼以加入推薦或附屬代碼 腳本的作者解釋: Directs to a referral link when not logged in

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name               Cryptoads.in + btblog.in Auto Tool
// @namespace          Violentmonkey Scripts
// @match              https://cryptoads.in/*
// @match              https://btblog.in/*
// @version            0.1
// @grant              GM_getValue
// @grant              GM_setValue
// @grant              GM_addStyle
// @grant              GM_registerMenuCommand
// @require            https://cdn.jsdelivr.net/npm/sweetalert2@11
// @require            https://update.greasyfork.org/scripts/439099/1203718/MonkeyConfig%20Modern%20Reloaded.js
// @description        Gabungan: Auto cryptoads.in login & klaim + auto klik tombol di btblog.in (continue, dll.)
// @author             OjoNgono
// @license            Copyright OjoNgono
// @antifeature        referral-link Directs to a referral link when not logged in
// @icon               https://i.ibb.co/XJSPdz0/large.png
// ==/UserScript==

(function () {
  'use strict';

  // Deteksi domain
  const host = window.location.hostname;

  // =========================
  // === 🔷 BAGIAN CRYPTOADS.IN ===
  // =========================
  if (host.includes("cryptoads.in")) {

    const cfg = new MonkeyConfig({
      title: 'Pengaturan Cryptoads',
      menuCommand: 'Buka Pengaturan',
      shadowWidth: '650px',
      shadowHeight: '500px',
      iframeWidth: '620px',
      iframeHeight: '450px',
      params: {
        Email: {
          label: "Email FaucetPay",
          type: "text",
          default: "",
          column: 'top'
        },
        cryptoChoice: {
          label: "Pilih Crypto",
          type: "select",
          choices: {
            doge: "DOGE",
            ltc: "LTC",
            sol: "SOL",
            trx: "TRX"
          },
          default: "doge"
        }
      }
    });

    const email = cfg.get('Email');
    const crypto = cfg.get('cryptoChoice');
    const REFERRAL = 'https://cryptoads.in/?r=158';

    function isLoggedIn() {
      return !document.querySelector('header a.btn.btn-accent[href="/"]');
    }

    function checkLoginReferral() {
      const loggedIn = isLoggedIn();

      if (loggedIn && (!email || email === '')) {
        Swal.fire({
          icon: 'warning',
          title: 'Email FaucetPay belum diisi!',
          text: 'Anda sudah login, tetapi belum mengisi Email FaucetPay di pengaturan.',
          confirmButtonText: 'Ya, logout',
          confirmButtonColor: '#d33',
          allowOutsideClick: false,
          allowEscapeKey: false,
          allowEnterKey: false
        }).then(() => {
          window.location.href = "https://cryptoads.in/logout";
        });
        return;
      }

      if (!loggedIn && (!email || email === '')) {
        Swal.fire({
          icon: 'info',
          title: 'Pengaturan Diperlukan',
          html: `Silakan buka menu <b>'Pengaturan Cryptoads'</b> dari ikon 🐵 userscript di browser Anda,<br>lalu isi Email FaucetPay.`,
          confirmButtonText: 'OK',
        });
        return;
      }

      if (!loggedIn) {
        if ((location.pathname === "/" || location.pathname === "") && !window.location.href.includes("?r=")) {
          window.location.href = REFERRAL;
        } else {
          if (email) fillLoginForm(email);
        }
      }
    }

    function fillLoginForm(email) {
      const form = document.querySelector('form.user');
      if (!form) return;
      const input = form.querySelector('input[name="wallet"]');
      const submit = form.querySelector('button[type="submit"]');
      if (input) input.value = email;

      if (submit) {
        const checker = setInterval(() => {
          if (document.querySelector('.iconcaptcha-widget.iconcaptcha-success')) {
            submit.click();
            clearInterval(checker);
          }
        }, 1000);
      }
    }

    function Redirect() {
      const loggedIn = isLoggedIn();
      const isOnDashboard = window.location.pathname === "/dashboard";

      if (loggedIn && isOnDashboard) {
        console.log("🔁 Redirecting to shortlink page...");
        window.location.href = `https://cryptoads.in/links/currency/${crypto}`;
      }
    }

    function autoGoClaim() {
      if (window.location.pathname !== `/faucet/currency/${crypto}`) return;

      const goClaimInterval = setInterval(() => {
        const buttons = document.querySelectorAll('a.btn');
        for (const btn of buttons) {
          if (btn.textContent.trim().toLowerCase() === 'go claim') {
            console.log("✅ Tombol 'Go Claim' ditemukan, klik dalam 1 detik...");
            clearInterval(goClaimInterval);
            setTimeout(() => btn.click(), 1000);
            return;
          }
        }
      }, 1000);
    }

    function autoShortlinkClaimLoop() {
      if (window.location.pathname !== `/links/currency/${crypto}`) return;

      const interval = setInterval(() => {
        const buttons = document.querySelectorAll('a.btn');

        for (const btn of buttons) {
          const text = btn.innerText.trim().toLowerCase();

          if (/claim\s[1-5]\/5/i.test(text)) {
            console.log(`🔍 Menemukan tombol: ${text}`);
            btn.scrollIntoView({ behavior: 'smooth', block: 'center' });

            if (!btn.disabled && btn.offsetParent !== null) {
              console.log("✅ Klik tombol klaim sekarang...");
              clearInterval(interval);
              setTimeout(() => {
                btn.click();
              }, 1000);
            }
            return;
          }

          if (text.includes("0/5")) {
            console.log("🛑 Sudah 0/5, redirect ke faucet...");
            clearInterval(interval);
            window.location.href = `https://cryptoads.in/faucet/currency/${crypto}`;
            return;
          }
        }
      }, 1000);
    }

    let claimClicked = false;

    function clickClaimFaucet() {
      if (claimClicked) return;

      const btn = document.getElementById('subbutt');
      const isCaptchaSolved = document.querySelector('.iconcaptcha-widget.iconcaptcha-success');

      if (btn && isCaptchaSolved && !btn.disabled) {
        console.log("✅ Captcha selesai. Mengklik tombol subbutt...");
        btn.click();
        claimClicked = true;
      }
    }

    window.addEventListener('load', () => {
      checkLoginReferral();
      Redirect();
      setInterval(clickClaimFaucet, 1000);
      autoGoClaim();
      autoShortlinkClaimLoop();
    });
  }

  // =========================
  // === 🟢 BAGIAN BTBLOG.IN ===
  // =========================
  else if (host.includes("btblog.in")) {

    const teksYangDicari = [
      "im not robot",
      "generate link",
      "get link",
      "continue",
      "download link"
    ];

    function klikTombolBerdasarkanTeks() {
      const semuaElemenKlik = document.querySelectorAll('a, button, div, span');

      semuaElemenKlik.forEach(el => {
        const teks = el.innerText.trim().toLowerCase();

        if (teksYangDicari.includes(teks)) {
          let targetKlik = el;

          if (el.tagName === 'BUTTON' && el.parentElement.tagName === 'A') {
            targetKlik = el.parentElement;
          }

          console.log('🟢 Klik tombol:', teks);
          targetKlik.click();
        }
      });
    }

    klikTombolBerdasarkanTeks();
    setInterval(klikTombolBerdasarkanTeks, 1000);
  }

})();