prevent double eventlistener

This commit is contained in:
Simon 2023-08-26 22:51:21 +07:00
parent f3064f32b1
commit c79c0cc408
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -365,6 +365,7 @@ function getNearestLink(element) {
} }
function processTitle(titleContainer) { function processTitle(titleContainer) {
if (titleContainer.hasListener) return
Object.assign(titleContainer.style, { Object.assign(titleContainer.style, {
display: 'flex', display: 'flex',
gap: '15px', gap: '15px',
@ -383,6 +384,7 @@ function processTitle(titleContainer) {
if (!taButton) return; if (!taButton) return;
taButton.style.opacity = 0; taButton.style.opacity = 0;
}); });
titleContainer.hasListener = true;
} }
function checkVideoExists(taButton) { function checkVideoExists(taButton) {