// ==UserScript== // @name 程序员盒子自动登录、自动签到后台脚本 // @namespace https://bbs.tampermonkey.net.cn/ // @version 0.6.0 // @description 启动浏览器时程序员盒子自动登录、自动签到,请使用脚本猫 备注:由于脚本早期未设置定时运行和次数限制,被程序员盒子网站判定为高频恶意签到,一旦检查到将永久封禁使用,所以请脚本使用者尽快更新 // @author xinliushi // @license MIT // @background // @crontab * 1-23 once * * // @grant GM_xmlhttpRequest // @grant GM_log // @icon https://www.coderutil.com/favicon.ico // @connect coderutil.com // ==/UserScript== return new Promise((resolve, reject) => { // Your code here... GM_xmlhttpRequest({ method: 'POST', url: 'https://www.coderutil.com/api/user/login', headers:{ "Content-Type": "application/json;charset=UTF-8" }, responseType:"json", data:"{\"mobile\":\"手机号\", \"password\": \"密码\"}", onload: (xhr) => { GM_log(xhr); resolve(); } }) GM_xmlhttpRequest({ method: 'POST', url: 'https://www.coderutil.com/api/signIn/click', headers:{ "Content-Type": "application/json" }, onload: (xhr) => { GM_log(xhr); resolve(); } }) });