From d68cc1600855e4566270085a50f6a6762effb6d5 Mon Sep 17 00:00:00 2001 From: Heikki Hellgren Date: Fri, 4 Oct 2024 08:28:04 +0300 Subject: [PATCH] fix: disabled icon in new tab and navigation --- chrome/yt.js | 3 +++ firefox/yt.js | 2 ++ 2 files changed, 5 insertions(+) diff --git a/chrome/yt.js b/chrome/yt.js index 62bb692..5984472 100644 --- a/chrome/yt.js +++ b/chrome/yt.js @@ -218,8 +218,11 @@ chrome.tabs.onActivated.addListener(function (info) { // Tab update listener chrome.tabs.onUpdated.addListener(async function (tabId, changeInfo, tab) { if (!isEnabledForTab(tab)) { + changeIcon(true); return; } + + changeIcon(false); await injectScript(tab); if ( diff --git a/firefox/yt.js b/firefox/yt.js index 54b2a54..3f869e3 100644 --- a/firefox/yt.js +++ b/firefox/yt.js @@ -220,9 +220,11 @@ browser.tabs.onActivated.addListener(function (info) { // Tab update listener browser.tabs.onUpdated.addListener(async function (tabId, changeInfo, tab) { if (!isEnabledForTab(tab)) { + changeIcon(true); return; } + changeIcon(false); await injectScript(tab); if (