uploads: fix related tags error on multi-file upload page.

Fix the related tags Javascript trying to run on the multi-file upload
page. It should only run on the single-file upload page.
This commit is contained in:
evazion
2022-02-15 00:53:36 -06:00
parent 36265dbff0
commit e0ed6391f5
4 changed files with 11 additions and 5 deletions

View File

@@ -21,7 +21,7 @@ RelatedTag.initialize_all = function() {
// Show the related tags automatically when the "Edit" tab is opened, or by default on the uploads page.
$(document).on("danbooru:open-post-edit-tab", RelatedTag.show);
if ($("#c-uploads #a-show").length) {
if ($("#c-uploads #a-show #p-single-asset-upload").length) {
RelatedTag.show();
}
}

View File

@@ -7,7 +7,7 @@ Upload.IQDB_MIN_SIMILARITY = 50;
Upload.IQDB_HIGH_SIMILARITY = 70;
Upload.initialize_all = function() {
if ($("#c-uploads #a-show").length) {
if ($("#c-uploads #a-show #p-single-asset-upload").length) {
this.initialize_similar();
$("#toggle-artist-commentary").on("click.danbooru", function(e) {