more js crap
This commit is contained in:
parent
cc4cee1322
commit
0e72397956
@ -28,7 +28,15 @@ var nntpchan_mod_commit_spam = function(elem) {
|
||||
}
|
||||
}
|
||||
formdata.set("spam", spams.join(","));
|
||||
var jax = new XMLHttpRequest();
|
||||
jax.onreadystatechange = function() {
|
||||
if(jax.readyState == 4)
|
||||
{
|
||||
if(jax.status == 200)
|
||||
{
|
||||
|
||||
var ajax = new XMLHttpRequest();
|
||||
ajax.setRequestHeader("X-CSRF-Token", jax.getResponseHeader("X-CSRF-Token"));
|
||||
ajax.onreadystatechange = function() {
|
||||
if(ajax.readyState == 4)
|
||||
{
|
||||
@ -53,7 +61,15 @@ var nntpchan_mod_commit_spam = function(elem) {
|
||||
};
|
||||
ajax.open("POST", "/mod/spam")
|
||||
ajax.send(formdata);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
elem.innerText = "failed to moderate, not logged in";
|
||||
}
|
||||
}
|
||||
};
|
||||
jax.open("GET", "/mod/");
|
||||
jax.send();
|
||||
};
|
||||
|
||||
var nntpchan_mod_delete = function(longhash) {
|
||||
|
Reference in New Issue
Block a user