Archived
1
0

add more actions to mod panel

This commit is contained in:
jeff 2015-09-23 08:54:49 -04:00
parent 5e3f2eea03
commit 00fbc305be
2 changed files with 30 additions and 0 deletions

View File

@ -42,6 +42,17 @@ function nntpchan_unban() {
}) })
} }
function get_board_target() {
var e = document.getElementById("nntpchan_board_target");
return e.value;
}
function nntpchan_admin_board(method) {
nntpchan_admin(method, {
newsgroup: get_board_target()
})
}
function nntpchan_admin(method, param) { function nntpchan_admin(method, param) {
nntpchan_mod({ nntpchan_mod({
name:"admin", name:"admin",

View File

@ -26,6 +26,24 @@
</div> </div>
</div> </div>
<hr /> <hr />
<div>
<div> board actions </div>
<div>
<label for="nntpchan_board_target">board name:</label>
<input type="text" id="nntpchan_board_target" />
</div>
<div>
<button onclick="nntpchan_admin_board('frontend.regen')">regenerate</button>
</div>
<div>
<button onclick="nntpchan_admin_board('frontend.ban')">ban</button>
<button onclick="nntpchan_admin_board('frontend.unban')">unban</button>
</div>
<div>
<button onclick="nntpchan_admin_board('frontend.nuke')">nuke</button>
</div>
</div>
<hr />
<div> <div>
<div> <div>
lightweight actions lightweight actions
@ -34,6 +52,7 @@
<button onclick="nntpchan_admin('template.reload', {})">reload all templates</button> <button onclick="nntpchan_admin('template.reload', {})">reload all templates</button>
</div> </div>
</div> </div>
<hr />
<div> <div>
<label>very load heavy actions, use with care</label> <label>very load heavy actions, use with care</label>
<div> <div>