diff options
author | Ajay Ramachandran <[email protected]> | 2020-07-05 00:21:26 -0400 |
---|---|---|
committer | Ajay Ramachandran <[email protected]> | 2020-07-05 00:21:26 -0400 |
commit | 48861439b7ed4b27e77a684c98f456489de6fc58 (patch) | |
tree | a1fc58bdf83027365173368cafd34e398e1053b7 /src | |
parent | bd60875c66010d59270b9abeb53572e1eed6e807 (diff) | |
download | SponsorBlock-48861439b7ed4b27e77a684c98f456489de6fc58.tar.gz SponsorBlock-48861439b7ed4b27e77a684c98f456489de6fc58.zip |
Don't run time without skips on mobile or invidious
Diffstat (limited to 'src')
-rw-r--r-- | src/content.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/content.ts b/src/content.ts index 9b824001..7a74ddc3 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1574,6 +1574,8 @@ function updateAdFlag() { } function showTimeWithoutSkips(allSponsorTimes): void { + if (onMobileYouTube || onInvidious) return; + let skipDuration = 0; // Calculate skipDuration based from the segments in the preview bar @@ -1587,7 +1589,7 @@ function showTimeWithoutSkips(allSponsorTimes): void { // YouTube player time display let display = document.getElementsByClassName("ytp-time-display notranslate")[0]; - if (display === undefined) return + if (!display) return; let formatedTime = utils.getFormattedTime(video.duration - skipDuration); |