Greasy Fork 支持简体中文。

TEMU自动点击下一条

Automatically click through popups on https://seller.kuajingmaihuo.com/ including the final 'I have read' popup

// ==UserScript==
// @name         TEMU自动点击下一条
// @license MIT
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  Automatically click through popups on https://seller.kuajingmaihuo.com/ including the final 'I have read' popup
// @author       Your Name
// @match        https://seller.kuajingmaihuo.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Helper function to click buttons with specific text
    function clickPopupButtons(buttonText) {
        // Find all buttons with the specific class that might be used in popups
        let buttons = document.querySelectorAll('button.BTN_outerWrapperBtn_5-109-0');
        // Iterate over the buttons and click the one with the matching text
        buttons.forEach(function(button) {
            if (button.textContent.includes(buttonText)) {
                button.click();
            }
        });
    }

    // Set an interval to try and click the buttons every 500 milliseconds (0.5 second)
    setInterval(function() {
        // Click the 'Next' button
        clickPopupButtons('下一条');
        // Click the 'I have read' button, which is the new popup button
        clickPopupButtons('我已阅读');
    }, 500);
})();