Skip to content

Commit

Permalink
Merge pull request #27 from NDevTK/detect-discard
Browse files Browse the repository at this point in the history
Detect discard
  • Loading branch information
NDevTK authored Apr 1, 2022
2 parents c16415e + 51b5406 commit 4e19df9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ function remove(tabId) {
chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
if (autoPauseWindow !== null && autoPauseWindow !== tab.windowId) return
if (ignoredTabs.has(tabId)) return
if (changeInfo.discarded) {
return remove(tabId);
}
if (hasProperty(changeInfo, 'mutedInfo')) {
if (changeInfo.mutedInfo.muted && media.has(tabId)) {
if (hasProperty(options, 'pausemuted')) send(tabId, 'pausemuted');
Expand Down

0 comments on commit 4e19df9

Please sign in to comment.