From 842b49fea92945d8c57d7ce821e90b7a4c61e032 Mon Sep 17 00:00:00 2001 From: larley <121249322+DevLARLEY@users.noreply.github.com> Date: Thu, 24 Oct 2024 22:30:43 +0200 Subject: [PATCH] Resolved performance issues --- content_script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content_script.js b/content_script.js index 4095a5f..cf52017 100644 --- a/content_script.js +++ b/content_script.js @@ -61,7 +61,7 @@ function getEventListeners(type) { const listeners = store[type]; let wrappedListener = listener; - if (!!listener && !listener._isWrapped) { + if (type === "message" && !!listener && !listener._isWrapped) { wrappedListener = async function(event) { if (event instanceof MediaKeyMessageEvent) { if (event._isCustomEvent) { @@ -146,4 +146,4 @@ function getEventListeners(type) { return await _target.apply(_this, _args); }); } -})(); \ No newline at end of file +})();