Skip to content

armgit / my-yt

Public Imported from GitHub
0

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

JavaScript

cleanup

Christian Fei56f16582ad6e
diff --git a/index.html b/index.html
index 43bbc9a..d8cc046 100644
--- a/index.html
+++ b/index.html
@@ -181,8 +181,7 @@
$closeVideoPlayer.addEventListener("click", () => $videoPlayer.close())
$videoPlayer.addEventListener('close', () => {
- const video = $videoPlayer.querySelector('video')
- if (video) video.pause()
+ $videoPlayer.querySelector('video')?.pause()
})
const $showThumbnails = document.getElementById('show-thumbnails')
diff --git a/server.js b/server.js
index 5417b7d..8a67199 100644
--- a/server.js
+++ b/server.js
@@ -191,7 +191,6 @@ function createServer ({repo, port = 3000}) {
//https://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js/29126190#29126190
var range = req.headers.range || "";
var total = stats.size;
- console.log({stats, range, total})
if (range) {
var parts = range.replace(/bytes=/, "").split("-");
var partialstart = parts[0];