Greasy Fork is available in English.
自动领取任务。
当前为
// ==UserScript==
// @name 自动领取任务
// @version 0.6
// @include https://www.mcbbs.net/*
// @author xmdhs
// @description 自动领取任务。
// @namespace http://greasyfork.icu/users/166541
// ==/UserScript==
(function () {
var times = localStorage.getItem("autoapply")
if (Math.round(new Date().getTime()/1000) - times >= 60){
localStorage.setItem("autoapply",Math.round(new Date().getTime()/1000))
}else{
return
}
var a = document.getElementsByClassName("user_info_menu_btn");
var b = a[0].childNodes[7].lastChild.href;
var c = b.indexOf('&formhash=');
var key = b.substring(c + 10);
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) {
var xmlhttp;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", "home.php?mod=task&do=" + type + "&id=" + a + "&hash=" + key, true);
xmlhttp.send();
}