Skip to content

Commit

Permalink
fix: false pause on channel page
Browse files Browse the repository at this point in the history
  • Loading branch information
livingflore committed Apr 28, 2024
1 parent ceeb90d commit 22aadaa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/features/pauseBackgroundPlayers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export async function enablePauseBackgroundPlayers() {
}
} = optionsData;
if (!pauseBackgroundPlayersEnabled) return;
// ignore home page
if (window.location.href.match(/^https?:\/\/(?:www\.)?youtube\.com\/?$/gm)) return;
// ignore home page and channel pages
if (window.location.href.match(/^https?:\/\/(?:www\.)?youtube\.com(\/?|\/channel\/.+|\/\@.+)$/gm)) return;
browserColorLog("Enabling pauseBackgroundPlayers", "FgMagenta");

let videoPlayerContainer: HTMLVideoElement | null = null;
Expand Down

0 comments on commit 22aadaa

Please sign in to comment.