mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-15 07:57:09 +03:00
Remove first event check
This commit is contained in:
@@ -74,9 +74,6 @@ let lastPreviewBarUpdate;
|
|||||||
// Is the video currently being switched
|
// Is the video currently being switched
|
||||||
let switchingVideos = null;
|
let switchingVideos = null;
|
||||||
|
|
||||||
// Made true every videoID change
|
|
||||||
let firstEvent = false;
|
|
||||||
|
|
||||||
// Used by the play and playing listeners to make sure two aren't
|
// Used by the play and playing listeners to make sure two aren't
|
||||||
// called at the same time
|
// called at the same time
|
||||||
let lastCheckTime = 0;
|
let lastCheckTime = 0;
|
||||||
@@ -307,8 +304,6 @@ function resetValues() {
|
|||||||
logDebug("Setting switching videos to true (reset data)");
|
logDebug("Setting switching videos to true (reset data)");
|
||||||
}
|
}
|
||||||
|
|
||||||
firstEvent = true;
|
|
||||||
|
|
||||||
// Reset advert playing flag
|
// Reset advert playing flag
|
||||||
isAdPlaying = false;
|
isAdPlaying = false;
|
||||||
|
|
||||||
@@ -707,8 +702,7 @@ function setupVideoListeners() {
|
|||||||
// This check makes sure that changing the video resolution doesn't cause the extension to think it
|
// This check makes sure that changing the video resolution doesn't cause the extension to think it
|
||||||
// gone back to the begining
|
// gone back to the begining
|
||||||
if (video.readyState <= HTMLMediaElement.HAVE_CURRENT_DATA
|
if (video.readyState <= HTMLMediaElement.HAVE_CURRENT_DATA
|
||||||
&& !firstEvent && video.currentTime === 0) return;
|
&& video.currentTime === 0) return;
|
||||||
firstEvent = false;
|
|
||||||
|
|
||||||
updateVirtualTime();
|
updateVirtualTime();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user