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

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 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);
  }

})();