// ==UserScript== // @name hhclub-lucky-draw // @namespace http://tampermonkey.net/ // @version 0.2 // @description 憨憨幸运大转盘自动抽奖,安装后打开大转盘页面,就会自动抽奖 // @author alkali // @match https://hhanclub.top/lucky.php // @require https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js // @grant none // @downloadURL https://update.greasyfork.icu/scripts/483516/hhclub-lucky-draw.user.js // @updateURL https://update.greasyfork.icu/scripts/483516/hhclub-lucky-draw.meta.js // ==/UserScript== (function () { 'use strict'; const luckydraw = { enabled: false, sleep: (ms) => new Promise(resolve => setTimeout(resolve, ms)), do() { fetch("https://hhanclub.top/plugin/lucky-draw", { "body": null, "method": "POST", }).then(res=>res.json()).then(res=>{ console.log(res.data) let duration = res.data.duration fetch("/plugin/lucky-draw/winning-records?__format=data-table&start=1&length=5&draw=250", { "method": "GET", }).then(res=>res.json()).then(async res=>{ let arr = res.data.map(item => { return `