additional keyboard shortcuts
This commit is contained in:
@@ -6,6 +6,10 @@
|
||||
Danbooru.Post.initialize_all = function() {
|
||||
this.initialize_titles();
|
||||
|
||||
if ($("#c-posts").length) {
|
||||
this.initialize_shortcuts();
|
||||
}
|
||||
|
||||
if ($("#c-posts").length && $("#a-index").length) {
|
||||
this.initialize_wiki_page_excerpt();
|
||||
}
|
||||
@@ -19,6 +23,21 @@
|
||||
}
|
||||
}
|
||||
|
||||
Danbooru.Post.initialize_shortcuts = function() {
|
||||
key('/', function(e) {
|
||||
$("#tags").trigger("focus");
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
if ($("#a-show").length) {
|
||||
key('e', function(e) {
|
||||
$("#post-edit-link").trigger("click");
|
||||
$("#post_tag_string").trigger("focus");
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Danbooru.Post.initialize_links = function() {
|
||||
$("#side-edit-link").click(function(e) {
|
||||
$("#post-edit-link").trigger("click");
|
||||
|
||||
Reference in New Issue
Block a user