您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
No more sending gifts and raffles one by one! Only works in friends page
// ==UserScript== // @name Mousehunt one click send gifts and raffles // @namespace http://tampermonkey.net/ // @version 0.3 // @description No more sending gifts and raffles one by one! Only works in friends page // @author kaninchen // @match https://www.mousehuntgame.com/* // @require https://cdn.jsdelivr.net/npm/[email protected]/mousehunt-utils.js // @icon https://www.google.com/s2/favicons?sz=64&domain=mousehuntgame.com // @grant none // ==/UserScript== (function() { function sendGiftRaffle(){ for (let i = 0; i < 19; i++) { const delayTime = Math.floor(Math.random() * (300 - 100 + 1) + 100); setTimeout(function() { document.getElementsByClassName("userInteractionButtonsView-button sendTicket mousehuntTooltipParent ")[i].onclick(); const delayTime2 = Math.floor(Math.random() * (300 - 100 + 1) + 100); setTimeout(function() { document.getElementsByClassName("userInteractionButtonsView-button sendGift mousehuntTooltipParent ")[i].onclick(); }, delayTime2); }, delayTime * i); } } function showButtons(){ if (document.getElementsByClassName("friendsPage-list-header")[0].children.length < 3){ var prevButton = document.createElement("BUTTON"); var nextButton = document.createElement("BUTTON"); let btn = document.createElement("BUTTON"); let div = document.getElementsByClassName("friendsPage-list-header")[0]; btn.innerHTML = "Send Gifts and Raffles to all"; prevButton.innerHTML = "Previous"; nextButton.innerHTML = "Next"; div.appendChild(prevButton); div.appendChild(btn); div.appendChild(nextButton); prevButton.onclick = () => { app.pages.FriendsPage.tab_view_friends.pager.showPreviousPage(event); }; btn.onclick = () => { sendGiftRaffle() }; nextButton.onclick = () => { app.pages.FriendsPage.tab_view_friends.pager.showNextPage(event); }; } } onPageChange({ friends: { show: () => { showButtons() } }, }); showButtons(); })();