diff options
author | Ajay Ramachandran <[email protected]> | 2020-09-04 00:13:51 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2020-09-04 00:13:51 -0400 |
commit | 2798ac1254cdf546915cc6948d24c26475539882 (patch) | |
tree | 7e57cd4e29abe66b86cd954bda063cff1bdc059b /src/content.ts | |
parent | 3ec3a011281f946b749335aafaf5aad8d64d7422 (diff) | |
parent | 0f8739abc06e1610174e99bccf157d93f27804ea (diff) | |
download | SponsorBlock-2798ac1254cdf546915cc6948d24c26475539882.tar.gz SponsorBlock-2798ac1254cdf546915cc6948d24c26475539882.zip |
Merge pull request #456 from ajayyy/expiremental
Improvements
Diffstat (limited to 'src/content.ts')
-rw-r--r-- | src/content.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/content.ts b/src/content.ts index 7f75ada0..11716db2 100644 --- a/src/content.ts +++ b/src/content.ts @@ -324,7 +324,7 @@ async function videoIDChange(id) { if (previousVideoID != null) { //get the sponsor times from storage let sponsorTimes = Config.config.segmentTimes.get(previousVideoID); - if (sponsorTimes != undefined && sponsorTimes.length > 0) { + if (sponsorTimes != undefined && sponsorTimes.length > 0 && new URL(document.URL).host !== "music.youtube.com") { //warn them that they have unsubmitted sponsor times chrome.runtime.sendMessage({ message: "alertPrevious", @@ -760,7 +760,7 @@ function getYouTubeVideoID(url: string) { onInvidious = true; } else if (urlObject.host === "m.youtube.com") { onMobileYouTube = true; - } else if (!["m.youtube.com", "www.youtube.com", "www.youtube-nocookie.com"].includes(urlObject.host)) { + } else if (!["m.youtube.com", "www.youtube.com", "www.youtube-nocookie.com", "music.youtube.com"].includes(urlObject.host)) { if (!Config.config) { // Call this later, in case this is an Invidious tab utils.wait(() => Config.config !== null).then(() => videoIDChange(getYouTubeVideoID(url))); |