mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-25 17:08:42 +03:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7bf17e1746 | ||
|
|
3f7f671a3b |
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "__MSG_fullName__",
|
"name": "__MSG_fullName__",
|
||||||
"short_name": "SponsorBlock",
|
"short_name": "SponsorBlock",
|
||||||
"version": "5.1.10",
|
"version": "5.1.11",
|
||||||
"default_locale": "en",
|
"default_locale": "en",
|
||||||
"description": "__MSG_Description__",
|
"description": "__MSG_Description__",
|
||||||
"homepage_url": "https://sponsor.ajay.app",
|
"homepage_url": "https://sponsor.ajay.app",
|
||||||
|
|||||||
@@ -964,25 +964,23 @@ function updateVirtualTime() {
|
|||||||
if (utils.isFirefox()) {
|
if (utils.isFirefox()) {
|
||||||
let count = 0;
|
let count = 0;
|
||||||
let lastTime = lastKnownVideoTime.videoTime;
|
let lastTime = lastKnownVideoTime.videoTime;
|
||||||
if (lastKnownVideoTime.fromPause) {
|
currentVirtualTimeInterval = setInterval(() => {
|
||||||
currentVirtualTimeInterval = setInterval(() => {
|
if (lastTime !== video.currentTime) {
|
||||||
if (lastTime !== video.currentTime) {
|
count++;
|
||||||
count++;
|
lastTime = video.currentTime;
|
||||||
lastTime = video.currentTime;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (count > 1) {
|
if (count > 1) {
|
||||||
const delay = lastKnownVideoTime.fromPause && lastKnownVideoTime.approximateDelay ?
|
const delay = lastKnownVideoTime.fromPause && lastKnownVideoTime.approximateDelay ?
|
||||||
lastKnownVideoTime.approximateDelay : 0;
|
lastKnownVideoTime.approximateDelay : 0;
|
||||||
|
|
||||||
lastKnownVideoTime.videoTime = video.currentTime + delay;
|
lastKnownVideoTime.videoTime = video.currentTime + delay;
|
||||||
lastKnownVideoTime.preciseTime = performance.now();
|
lastKnownVideoTime.preciseTime = performance.now();
|
||||||
|
|
||||||
clearInterval(currentVirtualTimeInterval);
|
clearInterval(currentVirtualTimeInterval);
|
||||||
currentVirtualTimeInterval = null;
|
currentVirtualTimeInterval = null;
|
||||||
}
|
}
|
||||||
}, 1);
|
}, 1);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user