您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically presses the "Collect coins" button on AliExpress coin page
// ==UserScript== // @name site aliexpress - Auto Collect Coins // @namespace http://greasyfork.org // @version 2024.07.23.0340 // @license MIT // @description Automatically presses the "Collect coins" button on AliExpress coin page // @author hg42 // @match https://*.aliexpress.com/p/coin-* // @grant none // @run-at document-end // ==/UserScript== (function() { 'use strict'; function closeWindowIfEarnMoreCoins() { let buttons = document.querySelectorAll('div'); //console.log("earn?", buttons) for (const button of buttons) { if (button.innerHTML.trim() == "Earn more coins") { //console.log("earn:", button) window.close(); console.log("Earn more coins button found -> close window"); break; } } } function clickCollectCoinsButton() { let buttons = document.querySelectorAll('div'); //console.log("collect?", buttons) for (const button of buttons) { if (button.innerHTML.trim() == "Collect") { //console.log("collect:", button) button.click(); console.log("Collect coins button clicked"); setTimeout(closeWindowIfEarnMoreCoins, 5000); break; } } } window.addEventListener('load', function() { setTimeout(clickCollectCoinsButton, 7000); setTimeout(closeWindowIfEarnMoreCoins, 7000+5000); }); })();