From 7e091d1c677ce19bb0bda5770bcf7d7fa14bddb6 Mon Sep 17 00:00:00 2001 From: Ajay Date: Fri, 21 Jan 2022 18:39:07 -0500 Subject: [PATCH] Remove sponsor lookup retries --- src/content.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/content.ts b/src/content.ts index ad8bf2d5..f81200b2 100644 --- a/src/content.ts +++ b/src/content.ts @@ -95,10 +95,6 @@ window.addEventListener("DOMContentLoaded", () => utils.waitForElement(".ytp-inl addPageListeners(); addHotkeyListener(); -//the amount of times the sponsor lookup has retried -//this only happens if there is an error -let sponsorLookupRetries = 0; - /** Segments created by the user which have not yet been submitted. */ let sponsorTimesSubmitting: SponsorTime[] = []; @@ -233,7 +229,6 @@ function resetValues() { //reset sponsor times sponsorTimes = null; - sponsorLookupRetries = 0; sponsorSkipped = []; videoInfo = null; @@ -756,8 +751,6 @@ async function sponsorsLookup(id: string, keepOldSubmissions = true) { //otherwise the listener can handle it updatePreviewBar(); } - - sponsorLookupRetries = 0; } else if (response?.status === 404) { retryFetch(); } @@ -834,8 +827,6 @@ function retryFetch(): void { sponsorsLookup(sponsorVideoID); } }, 10000 + Math.random() * 30000); - - sponsorLookupRetries = 0; } /**