1
0
mirror of https://github.com/koloml/furbooru-tagging-assistant.git synced 2025-12-23 23:02:58 +00:00

Skip watching logic if there is no editor on the page

This commit is contained in:
2024-11-12 14:24:04 +04:00
parent 5092dc7f6d
commit 3e05b1964d

View File

@@ -199,6 +199,11 @@ export function wrapTagDropdown(element) {
}
export function watchTagDropdownsInTagsEditor() {
// We only need to watch for new editor elements if there is a tag editor present on the page
if (!document.querySelector('#image_tags_and_source')) {
return;
}
document.body.addEventListener('mouseover', event => {
/** @type {HTMLElement} */
const targetElement = event.target;