/posts/$id: fix shift+O to approve shortcut.
`Danbooru.Post.approve` is used for approving posts via the mode menu. It doesn't hide all the notices or the approve/disapprove/flag buttons. Click the link instead to hide those things. Click the #quick-mod-approve link instead of #approve because #approve prompts for confirmation.
This commit is contained in:
@@ -174,6 +174,12 @@
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
if (Danbooru.meta("current-user-can-approve-posts") === "true") {
|
||||
Danbooru.keydown("shift+o", "approve", function(e) {
|
||||
$("#quick-mod-approve").click();
|
||||
});
|
||||
}
|
||||
|
||||
Danbooru.keydown("a", "prev_page", Danbooru.Post.nav_prev);
|
||||
Danbooru.keydown("d", "next_page", Danbooru.Post.nav_next);
|
||||
Danbooru.keydown("f", "favorite", Danbooru.Post.favorite);
|
||||
|
||||
@@ -30,14 +30,6 @@
|
||||
});
|
||||
}
|
||||
|
||||
if ($("#c-posts").length && $("#a-show").length) {
|
||||
Danbooru.keydown("shift+o", "approve", function(e) {
|
||||
if (Danbooru.meta("current-user-can-approve-posts") === "true") {
|
||||
Danbooru.Post.approve(Danbooru.meta("post-id"));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if ($("#c-posts #a-index, #c-posts #a-show, #c-favorites #a-index").length) {
|
||||
Danbooru.keydown("r", "random", function(e) {
|
||||
$("#random-post")[0].click();
|
||||
|
||||
Reference in New Issue
Block a user