// ==UserScript== // @name 头顶冒火自动签到 // @namespace https://bbs.tampermonkey.net.cn/ // @version 0.0.3 // @description 启动浏览器时《头顶冒火》自动签到,请使用脚本猫 // @author Thousand_Star // @license MIT // @background // @crontab * 10-23 once * * // @grant GM_xmlhttpRequest // @grant GM_log // @grant GM_notification // @icon https://burn.hair/favicon.ico // @connect burn.hair // ==/UserScript== function notify(message) { GM_notification({ title: '头顶冒火自动签到', text: message }); } return new Promise((resolve, reject) => { GM_xmlhttpRequest({ method: 'POST', url: 'https://burn.hair/api/user/check_in', headers:{ "Content-Type": "application/json;charset=UTF-8" }, responseType:"json", onload: (xhr) => { GM_log(xhr) const message = xhr.response.message GM_log(message); notify(message) resolve(); } }) });