diff options
author | Ajay <[email protected]> | 2022-03-17 00:27:36 -0400 |
---|---|---|
committer | Ajay <[email protected]> | 2022-03-17 00:27:36 -0400 |
commit | d4544a7c473d6592465d1abe690c2da1a4150d3f (patch) | |
tree | 5adabdf0b2074eb1d85b620fd41507d9c1da23da | |
parent | d9f1ee9bb8fabe011bccd685cf49342b3ca2b7f8 (diff) | |
download | SponsorBlock-d4544a7c473d6592465d1abe690c2da1a4150d3f.tar.gz SponsorBlock-d4544a7c473d6592465d1abe690c2da1a4150d3f.zip |
Fixes for safari
-rw-r--r-- | public/content.css | 4 | ||||
-rw-r--r-- | src/content.ts | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/public/content.css b/public/content.css index 065cb759..790202d2 100644 --- a/public/content.css +++ b/public/content.css @@ -352,6 +352,10 @@ filter: brightness(80%); } +.segmentSummary { + outline: none; +} + .submitButton { background-color:#ec1c1c; -moz-border-radius:28px; diff --git a/src/content.ts b/src/content.ts index 776441bd..e133abe7 100644 --- a/src/content.ts +++ b/src/content.ts @@ -458,7 +458,7 @@ function startSponsorSchedule(includeIntersectingSegments = false, currentTime?: if (currentTime === undefined || currentTime === null) { const virtualTime = lastKnownVideoTime.videoTime ? (performance.now() - lastKnownVideoTime.preciseTime) / 1000 + lastKnownVideoTime.videoTime : null; - if (virtualTime && Math.abs(virtualTime - video.currentTime) < 0.6){ + if (!isSafari() && virtualTime && Math.abs(virtualTime - video.currentTime) < 0.6){ currentTime = virtualTime; } else { currentTime = video.currentTime; @@ -539,7 +539,7 @@ function startSponsorSchedule(includeIntersectingSegments = false, currentTime?: skippingFunction(); } else { const delayTime = timeUntilSponsor * 1000 * (1 / video.playbackRate); - if (delayTime < 300 && !isSafari()) { + if (delayTime < 300) { // For Firefox, use interval instead of timeout near the end to combat imprecise video time const startIntervalTime = performance.now(); const startVideoTime = Math.max(currentTime, video.currentTime); |