diff options
author | Ajay <[email protected]> | 2022-07-05 16:02:05 -0400 |
---|---|---|
committer | Ajay <[email protected]> | 2022-07-05 16:02:05 -0400 |
commit | 7a501672224561565fa62370d8206cb0c146e761 (patch) | |
tree | 65df57cf39160c2da6b2fdb1df2058a0668cbb33 | |
parent | e48d95657728bcb8bf00b58d18b36714bffc8f43 (diff) | |
download | SponsorBlock-7a501672224561565fa62370d8206cb0c146e761.tar.gz SponsorBlock-7a501672224561565fa62370d8206cb0c146e761.zip |
Remove first event check
-rw-r--r-- | src/content.ts | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/content.ts b/src/content.ts index f390340a..9d3aa8c7 100644 --- a/src/content.ts +++ b/src/content.ts @@ -74,9 +74,6 @@ let lastPreviewBarUpdate; // Is the video currently being switched let switchingVideos = null; -// Made true every videoID change -let firstEvent = false; - // Used by the play and playing listeners to make sure two aren't // called at the same time let lastCheckTime = 0; @@ -307,8 +304,6 @@ function resetValues() { logDebug("Setting switching videos to true (reset data)"); } - firstEvent = true; - // Reset advert playing flag 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 // gone back to the begining if (video.readyState <= HTMLMediaElement.HAVE_CURRENT_DATA - && !firstEvent && video.currentTime === 0) return; - firstEvent = false; + && video.currentTime === 0) return; updateVirtualTime(); |