From c663abcbcb1a81ac50835dc1a6dcae64ba506353 Mon Sep 17 00:00:00 2001 From: Dominik Reh Date: Fri, 13 Jan 2023 19:33:43 +0100 Subject: [PATCH] Fix wiki links showing on embeddings & wildcards --- javascript/tagAutocomplete.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/javascript/tagAutocomplete.js b/javascript/tagAutocomplete.js index dd63fcd..f2d04cd 100644 --- a/javascript/tagAutocomplete.js +++ b/javascript/tagAutocomplete.js @@ -454,7 +454,9 @@ function addResultsToList(textArea, results, tagword, resetList) { itemText.innerHTML = displayText.replace(tagword, `${tagword}`); // Add wiki link if the setting is enabled and a supported tag set loaded - if (CFG.showWikiLinks && (tagFileName.toLowerCase().startsWith("danbooru") || tagFileName.toLowerCase().startsWith("e621"))) { + if (CFG.showWikiLinks + && (result.type === ResultType.tag) + && (tagFileName.toLowerCase().startsWith("danbooru") || tagFileName.toLowerCase().startsWith("e621"))) { let wikiLink = document.createElement("a"); wikiLink.classList.add("acWikiLink"); wikiLink.innerText = "?";