mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 19:47:04 +03:00
Don't run time without skips on mobile or invidious
This commit is contained in:
@@ -1574,6 +1574,8 @@ function updateAdFlag() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function showTimeWithoutSkips(allSponsorTimes): void {
|
function showTimeWithoutSkips(allSponsorTimes): void {
|
||||||
|
if (onMobileYouTube || onInvidious) return;
|
||||||
|
|
||||||
let skipDuration = 0;
|
let skipDuration = 0;
|
||||||
|
|
||||||
// Calculate skipDuration based from the segments in the preview bar
|
// Calculate skipDuration based from the segments in the preview bar
|
||||||
@@ -1587,7 +1589,7 @@ function showTimeWithoutSkips(allSponsorTimes): void {
|
|||||||
|
|
||||||
// YouTube player time display
|
// YouTube player time display
|
||||||
let display = document.getElementsByClassName("ytp-time-display notranslate")[0];
|
let display = document.getElementsByClassName("ytp-time-display notranslate")[0];
|
||||||
if (display === undefined) return
|
if (!display) return;
|
||||||
|
|
||||||
let formatedTime = utils.getFormattedTime(video.duration - skipDuration);
|
let formatedTime = utils.getFormattedTime(video.duration - skipDuration);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user