Merge pull request #2873 from evazion/fix-hotkeys

Disable left/right keys for prev/next page on /posts/:id.
This commit is contained in:
Albert Yi
2017-02-03 14:28:03 -08:00
committed by GitHub
3 changed files with 4 additions and 4 deletions

View File

@@ -16,7 +16,7 @@
if ($("#c-forum-topics").length) {
Danbooru.keydown("shift+r", "mark_all_as_read", function(e) {
$("#secondary-links-mark-all-as-read a").click();
$("#forum-topic-mark-all-as-read a")[0].click();
});
}
}

View File

@@ -585,7 +585,7 @@ Danbooru.Note = {
$("#image").css("cursor", "auto");
$("#image").click(Danbooru.Note.Box.toggle_all);
$("#image").off("mousedown", Danbooru.Note.TranslationMode.Drag.start);
$(window).mouseup(Danbooru.Note.TranslationMode.Drag.stop);
$(window).off("mouseup", Danbooru.Note.TranslationMode.Drag.stop);
$(document.body).removeClass("mode-translation");
$("#close-notice-link").click();
$("#mark-as-translated-section").hide();

View File

@@ -177,8 +177,8 @@
e.preventDefault();
});
Danbooru.keydown("a left", "prev_page", Danbooru.Post.nav_prev);
Danbooru.keydown("d right", "next_page", Danbooru.Post.nav_next);
Danbooru.keydown("a", "prev_page", Danbooru.Post.nav_prev);
Danbooru.keydown("d", "next_page", Danbooru.Post.nav_next);
Danbooru.keydown("f", "favorite", function(e) {
if ($("#add-to-favorites").is(":visible")) {