From 7a501672224561565fa62370d8206cb0c146e761 Mon Sep 17 00:00:00 2001 From: Ajay Date: Tue, 5 Jul 2022 16:02:05 -0400 Subject: [PATCH] Remove first event check --- src/content.ts | 8 +------- 1 file changed, 1 insertion(+), 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();