Fix #1908: Allow E shortcut to work on upload page.

This commit is contained in:
evazion
2017-06-12 20:28:56 -05:00
parent 04ef575704
commit a1c9f34027

View File

@@ -11,6 +11,7 @@
$("#image").load(this.initialize_image);
this.initialize_info_bookmarklet();
this.initialize_similar();
this.initialize_shortcuts();
$("#related-tags-button").trigger("click");
$("#find-artist-button").trigger("click");
@@ -25,6 +26,13 @@
}
}
Danbooru.Upload.initialize_shortcuts = function() {
Danbooru.keydown("e", "edit", function(e) {
$("#upload_tag_string").focus();
e.preventDefault();
});
};
Danbooru.Upload.initialize_iqdb_source = function() {
if (/^https?:\/\//.test($("#normalized_url").val())) {
$.post("/iqdb_queries", {"url": $("#normalized_url").val()}).done(function(html) {$("#iqdb-similar").html(html)});