From 05d37ec650a1f0895bd1ebe36ae1e41920de31bb Mon Sep 17 00:00:00 2001 From: Ajay Date: Fri, 1 Apr 2022 01:17:13 -0400 Subject: [PATCH] Fix crash --- src/content.ts | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/content.ts b/src/content.ts index 8a5cae6b..145efb60 100644 --- a/src/content.ts +++ b/src/content.ts @@ -424,7 +424,6 @@ function durationChangeListener(): void { function videoOnReadyListener(): void { createPreviewBar(); updatePreviewBar(); - createButtons(); } function cancelSponsorSchedule(): void { @@ -1476,16 +1475,7 @@ async function updateVisibilityOfPlayerControlsButton(): Promise { // Not on a proper video yet if (!sponsorVideoID || onMobileYouTube) return; - await createButtons(); - updateEditButtonsOnPlayer(); - - // Don't show the info button on embeds - if (Config.config.hideInfoButtonPlayerControls || document.URL.includes("/embed/") || onInvidious) { - playerButtons.info.button.style.display = "none"; - } else { - playerButtons.info.button.style.removeProperty("display"); - } } /** Updates the visibility of buttons on the player related to creating segments. */ @@ -1604,8 +1594,6 @@ function openInfoMenu() { popupInitialised = false; - //hide info button - if (playerButtons.info) playerButtons.info.button.style.display = "none"; sendRequestToCustomServer('GET', chrome.runtime.getURL("popup.html"), function(xmlhttp) { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { @@ -1682,10 +1670,6 @@ function closeInfoMenu() { popup.remove(); - // Show info button if it's not an embed - if (!document.URL.includes("/embed/") && playerButtons.info) { - playerButtons.info.button.style.display = "unset"; - } } /**