Skip to content

armgit / my-yt

Public Imported from GitHub
0

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

JavaScript

feat: set document title with videos count

Christian1d9c0823637b
diff --git a/client/components/search-videos.js b/client/components/search-videos.js
index dc716f2..9f0cd3a 100644
--- a/client/components/search-videos.js
+++ b/client/components/search-videos.js
@@ -129,6 +129,7 @@ class SearchVideos extends HTMLElement {
videos.forEach(video =>
$videosContainer.appendChild(createVideoElement(video, showOriginalThumbnail))
)
+ document.title = `my-yt - (${videos.length})`
if (event) {
if (videos.length > 0) $status.innerText = `Found ${videos.length} video${videos.length === 1 ? '' : 's'}`
else $status.innerText = 'No videos found'