// ==UserScript== // @name NodeSeek自动签到 // @namespace https://bbs.tampermonkey.net.cn/ // @version 1.0.3 // @description NodeSeek自动签到脚本,默认:试试手气 // @author bmqy // @crontab * 8 once * * // @grant GM_xmlhttpRequest // @grant GM_getValue // @grant GM_notification // @connect www.nodeseek.com // @background // ==/UserScript== /* ==UserConfig== 配置: method: title: 签到方式 description: 选择签到方式,默认:试试手气 type: select default: '试试手气' values: ['试试手气','稳定保底'] ==/UserConfig==*/ return new Promise((resolve, reject) => { let method = GM_getValue('配置.method'); let api = 'https://www.nodeseek.com/api/attendance'; if(!method || method === '试试手气'){ api = `${api}?random=true`; } GM_xmlhttpRequest({ method: 'POST', url: api, onload: function (xhr) { let response = JSON.parse(xhr.response); if (xhr.status == 200) { if (response.success) { GM_notification(response.message); resolve(response.message); return; } else { GM_notification(response.message); } } else { GM_notification({ title: 'NodeSeek自动签到', text: response.message, }); reject(response.message); } } }); });