mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 01:01:55 +01:00
fix #1236
This commit is contained in:
parent
88f60c0e84
commit
0d34e643c7
2 changed files with 10 additions and 3 deletions
|
@ -652,4 +652,10 @@ input::-webkit-inner-spin-button {
|
|||
|
||||
.sponsorBlockCategoryPill:hover .categoryPillClose {
|
||||
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 {
|
||||
if (onMobileYouTube || onInvidious) return;
|
||||
if (onInvidious) return;
|
||||
|
||||
if (isNaN(skippedDuration) || skippedDuration < 0) {
|
||||
skippedDuration = 0;
|
||||
}
|
||||
|
||||
// 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;
|
||||
|
||||
const durationID = "sponsorBlockDurationAfterSkips";
|
||||
|
@ -2143,7 +2144,7 @@ function showTimeWithoutSkips(skippedDuration: number): void {
|
|||
if (duration === null) {
|
||||
duration = document.createElement('span');
|
||||
duration.id = durationID;
|
||||
duration.classList.add("ytp-time-duration");
|
||||
duration.classList.add(displayClass);
|
||||
|
||||
display.appendChild(duration);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue