// ==UserScript== // @name BTSCHOOL // @namespace https://gist.github.com/janlay/d2e136be5940348bb7aee4d9c6b87b5a // @version 2.0.3 // @author janlay // @loginURL https://pt.btschool.club/ // @updateURL https://gist.github.com/janlay/d2e136be5940348bb7aee4d9c6b87b5a/raw/btschool.js // @expire 604800e3 // @domain pt.btschool.club // ==/UserScript== const endpoint = 'https://pt.btschool.club/'; exports.run = async function(param) { const { status, data } = await axios.get(`${endpoint}index.php?action=addbonus`); if (status != 200) throw '访问失败'; if (/未登录/.test(data)) throw '未登录'; const re = /今天签到您获得(\d+)/; if (!re.test(data)) return '今日已签'; const [_, points] = data.match(re); return '+' + points; }; exports.check = async function(param) { var { data } = await axios.get(`${endpoint}index.php`); return /欢迎回来/.test(data); };