From c79c0cc4086b5f6f0240cdbdef1b55341e8a8c6d Mon Sep 17 00:00:00 2001 From: Simon Date: Sat, 26 Aug 2023 22:51:21 +0700 Subject: [PATCH] prevent double eventlistener --- extension/script.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extension/script.js b/extension/script.js index 797c471..83971fc 100644 --- a/extension/script.js +++ b/extension/script.js @@ -365,6 +365,7 @@ function getNearestLink(element) { } function processTitle(titleContainer) { + if (titleContainer.hasListener) return Object.assign(titleContainer.style, { display: 'flex', gap: '15px', @@ -383,6 +384,7 @@ function processTitle(titleContainer) { if (!taButton) return; taButton.style.opacity = 0; }); + titleContainer.hasListener = true; } function checkVideoExists(taButton) {