fix hotkeys
This commit is contained in:
@@ -493,7 +493,7 @@ Danbooru.Note = {
|
|||||||
$(function() {
|
$(function() {
|
||||||
if ($("#c-posts").length && $("#a-show").length && $("#image").length) {
|
if ($("#c-posts").length && $("#a-show").length && $("#image").length) {
|
||||||
$("#translate").one("click", Danbooru.Note.TranslationMode.start);
|
$("#translate").one("click", Danbooru.Note.TranslationMode.start);
|
||||||
$(document).bind("keypress", "n", Danbooru.Note.TranslationMode.start);
|
$(document).bind("keydown.n", Danbooru.Note.TranslationMode.start);
|
||||||
Danbooru.Note.load_all();
|
Danbooru.Note.load_all();
|
||||||
$("#image").click(Danbooru.Note.Box.toggle_all);
|
$("#image").click(Danbooru.Note.Box.toggle_all);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,13 +28,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.Post.initialize_shortcuts = function() {
|
Danbooru.Post.initialize_shortcuts = function() {
|
||||||
$(document).bind("keypress", '/', function(e) {
|
$(document).bind("keydown./", function(e) {
|
||||||
$("#tags").trigger("focus");
|
$("#tags").trigger("focus");
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
if ($("#a-show").length) {
|
if ($("#a-show").length) {
|
||||||
$(document).bind("keypress", 'e', function(e) {
|
$(document).bind("keydown.e", function(e) {
|
||||||
$("#post-edit-link").trigger("click");
|
$("#post-edit-link").trigger("click");
|
||||||
$("#post_tag_string").trigger("focus");
|
$("#post_tag_string").trigger("focus");
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|||||||
Reference in New Issue
Block a user