// ==UserScript== // @name 自动领取任务 // @version 0.8 // @include https://www.mcbbs.net/* // @author xmdhs // @description 自动领取任务。 // @namespace https://greasyfork.org/users/166541 // @downloadURL none // ==/UserScript== (function () { let times = localStorage.getItem("autoapply") if (Math.round(new Date().getTime() / 1000) - times >= 60) { localStorage.setItem("autoapply", Math.round(new Date().getTime() / 1000)) } else { return } jq.get("/api/mobile/index.php?version=4&module=profile", function (data, status) { let key = data.Variables.formhash setTimeout(function () { run(key, "39", "draw"); }, 5000); setTimeout(function () { run(key, "22", "draw"); }, 5000); setTimeout(function () { run(key, "40", "draw"); }, 3000); setTimeout(function () { run(key, "24", "draw"); }, 3000); setTimeout(function () { run(key, "24", "apply"); }, 3000); setTimeout(function () { run(key, "39", "apply"); }, 1000); setTimeout(function () { run(key, "22", "apply"); }, 1000); setTimeout(function () { run(key, "40", "apply"); }, 1000); }); } )(); function run(key, a, type) { jq.get("home.php?mod=task&do=" + type + "&id=" + a + "&hash=" + key) }