// ==UserScript== // @name auto-exchange-invite // @namespace http://tampermonkey.net/ // @version 1.0.0 // @copyright 2025-06-05 // @description:en Auto exchange pt invites when cost only 1,000 bonus in a random time 15s-60s. // @description:zh-CN 当邀请码价格为 1,000 魔力值的时候,随机等待 15s-60s 后自动交换。 // @author missingmeow // @match *://www.ptskit.com/mybonus.php* // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; // 定义等待函数 var wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); // 获取随机数 function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min)) + min; } // 交换邀请名额 function exchangeInvite() { try { const td = document.querySelector('td[id="outer"]'); if (!td) throw new Error('td not found'); const table = td.querySelector('table'); if (!table) throw new Error('table not found'); const rows = table.querySelectorAll('tr'); const targetRow = Array.from(rows).find(tr => { // 检查是否包含指定的