Skip to content

armgit / my-yt

Public Imported from GitHub
0

A clean and minimal youtube frontend, without all the ads and whistles

JavaScript

rm video player modal

Christian Fei8fdfa574cab1
diff --git a/client/index.html b/client/index.html
index 93aa0d1..588fcb0 100644
--- a/client/index.html
+++ b/client/index.html
@@ -51,12 +51,7 @@
</label>
<input type="checkbox" id="show-thumbnails"/>
</dialog>
-
- <dialog id="video-player">
- <button id="close">X</button>
- <div></div>
- </dialog>
-
+
<dialog id="summary">
<button id="close">X</button>
<div></div>
diff --git a/client/main.js b/client/main.js
index 4ee7d4d..4201f7b 100644
--- a/client/main.js
+++ b/client/main.js
@@ -316,12 +316,6 @@ const $closeSettings = $settings.querySelector("button")
$openSettings.addEventListener("click", () => $settings.showModal())
$closeSettings.addEventListener("click", () => $settings.close())
-// video player modal
-const $videoPlayer = document.querySelector('dialog#video-player')
-const $closeVideoPlayer = $videoPlayer.querySelector("button")
-$closeVideoPlayer.addEventListener("click", () => $videoPlayer.close())
-$videoPlayer.addEventListener('close', () => $videoPlayer.querySelector('video')?.pause())
-
// summary modal
const $summary = document.querySelector('dialog#summary')
const $closeSummary = $summary.querySelector("button")
@@ -340,7 +334,6 @@ applyShowThumbnails(store.get(store.showThumbnailsKey))
// observe dialog open/close and prevent body background scroll
observeDialogOpenPreventScroll($settings)
-observeDialogOpenPreventScroll($videoPlayer)
observeDialogOpenPreventScroll($summary)