Don't run time without skips on mobile or invidious

This commit is contained in:
Ajay Ramachandran
2020-07-05 00:21:26 -04:00
parent bd60875c66
commit 48861439b7

View File

@@ -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);