diff --git a/src/content.ts b/src/content.ts index a137433d..36907ab4 100644 --- a/src/content.ts +++ b/src/content.ts @@ -154,6 +154,7 @@ let isAdPlaying = false; let lastResponseStatus: number; let retryCount = 0; +let lookupWaiting = false; // Contains all of the functions and variables needed by the skip notice const skipNoticeContentContainer: ContentContainer = () => ({ @@ -965,10 +966,15 @@ function setupCategoryPill() { } async function sponsorsLookup(keepOldSubmissions = true) { + if (lookupWaiting) return; if (!video || !isVisible(video)) refreshVideoAttachments(); //there is still no video here if (!video) { - setTimeout(() => sponsorsLookup(), 100); + lookupWaiting = true; + setTimeout(() => { + lookupWaiting = false; + sponsorsLookup() + }, 100); return; }