mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-16 08:27:03 +03:00
Fix crash
This commit is contained in:
@@ -424,7 +424,6 @@ function durationChangeListener(): void {
|
|||||||
function videoOnReadyListener(): void {
|
function videoOnReadyListener(): void {
|
||||||
createPreviewBar();
|
createPreviewBar();
|
||||||
updatePreviewBar();
|
updatePreviewBar();
|
||||||
createButtons();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function cancelSponsorSchedule(): void {
|
function cancelSponsorSchedule(): void {
|
||||||
@@ -1476,16 +1475,7 @@ async function updateVisibilityOfPlayerControlsButton(): Promise<void> {
|
|||||||
// Not on a proper video yet
|
// Not on a proper video yet
|
||||||
if (!sponsorVideoID || onMobileYouTube) return;
|
if (!sponsorVideoID || onMobileYouTube) return;
|
||||||
|
|
||||||
await createButtons();
|
|
||||||
|
|
||||||
updateEditButtonsOnPlayer();
|
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. */
|
/** Updates the visibility of buttons on the player related to creating segments. */
|
||||||
@@ -1604,8 +1594,6 @@ function openInfoMenu() {
|
|||||||
|
|
||||||
popupInitialised = false;
|
popupInitialised = false;
|
||||||
|
|
||||||
//hide info button
|
|
||||||
if (playerButtons.info) playerButtons.info.button.style.display = "none";
|
|
||||||
|
|
||||||
sendRequestToCustomServer('GET', chrome.runtime.getURL("popup.html"), function(xmlhttp) {
|
sendRequestToCustomServer('GET', chrome.runtime.getURL("popup.html"), function(xmlhttp) {
|
||||||
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
|
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
|
||||||
@@ -1682,10 +1670,6 @@ function closeInfoMenu() {
|
|||||||
|
|
||||||
popup.remove();
|
popup.remove();
|
||||||
|
|
||||||
// Show info button if it's not an embed
|
|
||||||
if (!document.URL.includes("/embed/") && playerButtons.info) {
|
|
||||||
playerButtons.info.button.style.display = "unset";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user