Continious Simulate Click on Horizontal Arrow

Simulate clicks on div elements with specific class and style

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Continious Simulate Click on Horizontal Arrow
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Simulate clicks on div elements with specific class and style
// @author       max5555
// @match        https://cab.meest.cn/dashboard/buyout
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Inject the radial button
    const radialBtn = document.createElement('button');
    radialBtn.textContent = "Toggle Continuous Clicks";
    radialBtn.style.position = "fixed";
    radialBtn.style.bottom = "10px";
    radialBtn.style.right = "10px";
    radialBtn.style.zIndex = "10000";
    radialBtn.style.borderRadius = "50%";
    radialBtn.style.background = "red";
    radialBtn.style.color = "white";
    radialBtn.style.border = "none";
    radialBtn.style.padding = "10px 20px";
    document.body.appendChild(radialBtn);

    let clicking = false;
    let clickInterval;

    // Function to simulate clicks
    function simulateClicks() {
        const divs = document.querySelectorAll('div.horizontal-arrow:not(.clicked)'); // Select divs that have not been clicked
        divs.forEach(div => {
            if (div.style.transform === "rotate(0deg)") {
                div.click();
                div.classList.add('clicked'); // Mark the div as clicked
            }
        });
    }

    // Add event listener for the radial button
    radialBtn.addEventListener('click', function() {
        clicking = !clicking;
        if (clicking) {
            clickInterval = setInterval(simulateClicks, 1000); // Simulate click every 1 second
            radialBtn.style.background = "green";
        } else {
            clearInterval(clickInterval);
            radialBtn.style.background = "red";
            // Optional: Remove the 'clicked' class from all divs if you want to reset the state when stopping
            document.querySelectorAll('div.horizontal-arrow.clicked').forEach(div => {
                div.classList.remove('clicked');
            });
        }
    });

})();