Greasy Fork

Greasy Fork is available in English.

iQFaucetBtc

https://www.youtube.com/channel/UCm2XoBbuIVSgMagy3Q01tSw

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         iQFaucetBtc
// @namespace    https://iqfaucet.com/
// @version      0.1
// @description  https://www.youtube.com/channel/UCm2XoBbuIVSgMagy3Q01tSw
// @author       Laravandro
// @match        https://iqfaucet.com/btc/*
// @icon         https://images.app.goo.gl/YNa6zkpu1q2QC9Aa8
// @grant        none
// @license      MIT
// ==/UserScript==

(function () {
    'use strict';

    // Your code here...
    function remove_ads() {
        console.clear();
        $("#containertop").remove();
        $(".col-md-3").remove();
        $("iframe:not([title])").remove();
    }
    function submit_form() {
        flag = -1;
        $("button.btn-success").click();
        clearInterval(main);
    }
    function remaining() {
        let remaining_time = $(".alert-warning").text().replace(/^.*again/i, '').match(/\d+/)[0];
        console.log(`you must wait ${Number(remaining_time) + 1} minutes...`);
        setTimeout(() => redirect(BTC_CLAIM), (Number(remaining_time) + 1) * 60000);
    }
    function send_message(message) {
        console.log(message);
        // ! replace your telegram token and chat_id in below .. 
        var token = "";
        var chat_id = 0;
        var telegram_url = `https://api.telegram.org/bot${token}/sendMessage?chat_id=${chat_id}&text=${message}&parse_mode=html`;
        var api = new XMLHttpRequest();
        api.open("GET", telegram_url, true);
        api.send();
        var a = setInterval(() => {
            document.title += ` : ${t}`;
            if (api.status == 200 || t <= 0) {
                redirect(BTC_CLAIM);
                clearInterval(main);
                clearInterval(a);
            }
            t--;
        }, 1000);
    }
    const redirect = _url => { flag = -1; window.open(_url, "_self"); };

    // ??--------------------------------------------------------------------------------
    remove_ads();
    const CURRENT_URL = window.location.href;
    // ! replace your doge coin address in below ..
    const BTC_ADDRESS = "";
    const BTC_MAIN = "https://iqfaucet.com/btc/";
    const BTC_INDEX = "https://iqfaucet.com/btc/index.php";
    const BTC_VERIFY = "https://iqfaucet.com/btc/verify.php";
    const BTC_CLAIM = "https://iqfaucet.com/btc/index.php?c=1";
    let timer = 0, flag = 0, t = 15;

    let main = setInterval(() => {
        document.title = timer;
        if (CURRENT_URL === BTC_MAIN) {
            if (flag === 0 && $(".form-control").length) {
                flag = 1;
                $(".form-control").val(BTC_ADDRESS);
            } else if (flag === 1 && $("button.btn-primary").length) {
                flag = -1;
                $("button.btn-primary").click();
                clearInterval(main);
            }
            else { redirect(BTC_INDEX); clearInterval(main); }
        }
        if (CURRENT_URL === BTC_INDEX) {
            if (flag === 0 && $(".alert-warning").length) {
                flag = 2;
                remaining();
            } else {
                if (flag === 0 && $(".form-control").length) {
                    flag = 1;
                    $(".form-control").val(BTC_ADDRESS);
                } else if (flag === 1 && $("form").length === 1) submit_form();
                else if (flag === 0 && !$(".form-control").length && $("form").length === 1) submit_form();
            }
        } else if (CURRENT_URL.includes(BTC_VERIFY)) {
            if (flag === 0 && $("form").length === 1 && grecaptcha && grecaptcha.getResponse().length !== 0) setTimeout(() => submit_form(), 2500);
            else if (flag === 0 && timer >= 150) redirect(BTC_VERIFY);
        } else if (CURRENT_URL.includes(BTC_CLAIM)) {
            if (flag === 0 && $("h1 + .alert-success").length) {
                flag = -1;
                send_message($("h1 + .alert-success").text());
            } else if (flag === 0 && $(".alert-warning").length) {
                flag = 1;
                remaining();
            } else if (flag === 0 && $(".alert-danger").length) redirect(BTC_VERIFY);
        }
        timer++;
    }, 1000);


})();