mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 20:17:05 +03:00
fix #1236
This commit is contained in:
@@ -653,3 +653,9 @@ input::-webkit-inner-spin-button {
|
|||||||
.sponsorBlockCategoryPill:hover .categoryPillClose {
|
.sponsorBlockCategoryPill:hover .categoryPillClose {
|
||||||
display: inherit;
|
display: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* tweak for mobile duration */
|
||||||
|
#sponsorBlockDurationAfterSkips.ytm-time-display {
|
||||||
|
padding-left: 4px;
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
@@ -2126,14 +2126,15 @@ function updateAdFlag(): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function showTimeWithoutSkips(skippedDuration: number): void {
|
function showTimeWithoutSkips(skippedDuration: number): void {
|
||||||
if (onMobileYouTube || onInvidious) return;
|
if (onInvidious) return;
|
||||||
|
|
||||||
if (isNaN(skippedDuration) || skippedDuration < 0) {
|
if (isNaN(skippedDuration) || skippedDuration < 0) {
|
||||||
skippedDuration = 0;
|
skippedDuration = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// YouTube player time display
|
// YouTube player time display
|
||||||
const display = document.querySelector(".ytp-time-display.notranslate");
|
const displayClass = onMobileYouTube ? "ytm-time-display" : "ytp-time-display.notranslate"
|
||||||
|
const display = document.querySelector(`.${displayClass}`);
|
||||||
if (!display) return;
|
if (!display) return;
|
||||||
|
|
||||||
const durationID = "sponsorBlockDurationAfterSkips";
|
const durationID = "sponsorBlockDurationAfterSkips";
|
||||||
@@ -2143,7 +2144,7 @@ function showTimeWithoutSkips(skippedDuration: number): void {
|
|||||||
if (duration === null) {
|
if (duration === null) {
|
||||||
duration = document.createElement('span');
|
duration = document.createElement('span');
|
||||||
duration.id = durationID;
|
duration.id = durationID;
|
||||||
duration.classList.add("ytp-time-duration");
|
duration.classList.add(displayClass);
|
||||||
|
|
||||||
display.appendChild(duration);
|
display.appendChild(duration);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user