Additional shortlink

9/13/2024, 2:28:10 PM

目前为 2024-09-13 提交的版本。查看 最新版本

// ==UserScript==
// @name        Additional shortlink
// @namespace   Violentmonkey Scripts
// @match       https://techconnection.in/*
// @match       https://dled.co.in/*
// @match       https://bestloanoffer.net/*
// @match       https://computerpedia.in/*
// @match       https://moneymatteronline.com/*
// @grant       none
// @version     1.0
// @author      -
// @description 9/13/2024, 2:28:10 PM
// ==/UserScript==


(function() {
    'use strict';

    // Menunggu hingga halaman sepenuhnya dimuat
    window.addEventListener('load', function() {
        // Temukan tombol dengan ID tp-snp2
        var tombol = document.getElementById('tp-snp2');

        // Jika tombol ditemukan, klik tombol tersebut
        if (tombol) {
            tombol.click();
        }
    });



    // Fungsi untuk memeriksa dan mengklik tombol Verify
    function checkAndClickVerify() {
        const timerElement = document.getElementById('myTimer');
        const verifyButton = document.getElementById('VerifyBtn');

        if (timerElement && verifyButton) {
            const timerValue = parseInt(timerElement.textContent, 10);

            // Jika timer 0, klik tombol Verify dan lanjutkan scroll
            if (timerValue === 0) {
                verifyButton.click();
                scrollAndClickNext(); // Panggil fungsi untuk scroll dan klik tombol Next
            }
        }
    }

    // Fungsi untuk scroll ke bawah dan klik tombol Next
    function scrollAndClickNext() {
        setTimeout(() => {
            window.scrollTo(0, document.body.scrollHeight); // Scroll ke bawah
            const nextButton = document.getElementById('NextBtn');

            if (nextButton) {
                nextButton.click(); // Klik tombol Next setelah scroll
            }
        }, 2000); // Beri jeda 2 detik sebelum melakukan scroll dan klik
    }

    // Setiap 1 detik, periksa timer dan klik jika timer 0
    setInterval(checkAndClickVerify, 1000);
})();