Skip to content

Commit

Permalink
Fix muted tabs not clearing on tab close (#9)
Browse files Browse the repository at this point in the history
* Fix muted tabs not clearing on tab close

* fix format
  • Loading branch information
Rainyan authored Sep 2, 2023
1 parent 3c43aac commit 067c557
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions jump_to_audio_tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ browser.contextMenus.onClicked.addListener((info, tab) => {
promises.push(
browser.tabs.update(currentTab.id, {
active: false,
})
}),
);
}

Expand Down Expand Up @@ -226,7 +226,7 @@ function checkContextCompat() {
id: `${EXT_TAB_ID}placeholder`,
title: "Test menu support",
contexts: [context],
})
}),
);
CONTEXTS.push(context);
} catch (error) {
Expand Down Expand Up @@ -313,7 +313,13 @@ browser.tabs.onRemoved.addListener((tabId, removeInfo) => {
AUDIBLE_TABS = AUDIBLE_TABS.filter((x) => {
return x.id !== tabId;
});

MUTED_TABS = MUTED_TABS.filter((x) => {
return x.id !== tabId;
});

RECENT_TAB_IDS.delete(tabId);

populateMenu();
});

Expand Down

0 comments on commit 067c557

Please sign in to comment.