Archived
1
0

ammend mod panel js

This commit is contained in:
jeff 2015-09-23 09:04:37 -04:00
parent 40b7e0a88b
commit cec6f7cef5

View File

@ -66,7 +66,8 @@ function nntpchan_admin(method, param) {
return "nothing happened?"; return "nothing happened?";
} }
}, },
method: ( param && "POST" ) || "GET" method: ( param && "POST" ) || "GET",
data: param
}) })
} }
@ -157,7 +158,12 @@ function nntpchan_mod(mod_action) {
if (mod_action.name) { if (mod_action.name) {
var url = mod_action.name + "/" + target; var url = mod_action.name + "/" + target;
ajax.open(mod_action.method || "GET", url); ajax.open(mod_action.method || "GET", url);
var data = mod_action.data;
if (data) {
ajax.send(data);
} else {
ajax.send(); ajax.send();
}
} else { } else {
alert("mod action has no name"); alert("mod action has no name");
} }