Skip to content

Commit

Permalink
fix: disabled icon in new tab and navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
drodil committed Oct 4, 2024
1 parent 0585144 commit d68cc16
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions chrome/yt.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 2 additions & 0 deletions firefox/yt.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit d68cc16

Please sign in to comment.