COINCLIX

COINCLIX HELPER

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         COINCLIX
// @namespace    coinclix.by.gmxch
// @version      3.0
// @description  COINCLIX HELPER
// @author       gmxch
// @match        *://coinclix.co/*
// @match        *://geekgrove.net/*
// @match        *://vitalityvista.net/*
// @run-at       document-end
// @grant        GM_setClipboard
// ==/UserScript==

//=== THIS IS ADDITIONAL, U NEED TO DOWNLOAD SC "Bypass It"

(function () {
    'use strict';

    function runWhenHostMatches(hosts, callback) {
        if (hosts.some(host => window.location.hostname.includes(host))) {
            callback();
        }
    }

    function tungguElemen(selector, callback) {
        let interval = setInterval(() => {
            let elemen = document.querySelector(selector);
            if (elemen) {
                clearInterval(interval);
                callback(elemen);
            }
        }, 500);
    }

    function tungguDanKlik(selector) {
        let interval = setInterval(() => {
            let tombol = document.querySelector(selector);
            if (tombol) {
                clearInterval(interval);
                tombol.click();
            }
        }, 500);
    }

    // === Fungsi 1: Auto Copy & Klik (CoinClix) ===
    runWhenHostMatches(["coinclix.co"], function () {
        console.log("Fungsi Auto Copy aktif di CoinClix");

        tungguElemen("i.mdi-content-copy", tombolCopy => {
            let kode = tombolCopy.getAttribute("data-clipboard-text");
            if (kode) {
                GM_setClipboard(kode);
                console.log("Kode disalin ke clipboard:", kode);
                setTimeout(() => tombolCopy.click(), 500);
            }
        });
    });

    // === Fungsi 2: Auto Paste & Submit (GeekGrove/VitalityVista) ===
    runWhenHostMatches(["geekgrove.net", "vitalityvista.net"], function () {
        console.log("Fungsi Auto Paste aktif di", window.location.hostname);

        navigator.clipboard.readText().then(kode => {
            if (!kode.trim()) {
                console.warn("Clipboard kosong, tidak ada kode untuk dipaste.");
                return;
            }

            tungguElemen("#link_input.form-control", inputForm => {
                inputForm.focus();
                inputForm.click();
                setTimeout(() => {
                    inputForm.value = kode;
                    inputForm.dispatchEvent(new Event("input"));

                    tungguDanKlik(".btn-primary.btn-ripple"); // Klik Submit
                    setTimeout(() => {
                        tungguDanKlik(".btn-ripple.bg-gradient.btn-primary.btn"); // Klik Continue
                    }, 1000);
                }, 300);
            });
        });
    });

})();