Remove duplicate event listeners

This commit is contained in:
guaneec 2022-10-08 16:01:34 +08:00 committed by AUTOMATIC1111
parent 772db721a5
commit 32e428ff19
1 changed files with 3 additions and 0 deletions

View File

@ -86,6 +86,9 @@ function showGalleryImage(){
if(fullImg_preview != null){ if(fullImg_preview != null){
fullImg_preview.forEach(function function_name(e) { fullImg_preview.forEach(function function_name(e) {
if (e.dataset.modded)
return;
e.dataset.modded = true;
if(e && e.parentElement.tagName == 'DIV'){ if(e && e.parentElement.tagName == 'DIV'){
e.style.cursor='pointer' e.style.cursor='pointer'