A clean and minimal youtube frontend, without all the ads and whistles
JavaScript
chore: cleanup
Christian Fei42bb684574b0
diff --git a/client/components/search-videos.js b/client/components/search-videos.jsindex 8642a16..3b1e5a1 100644--- a/client/components/search-videos.js+++ b/client/components/search-videos.js@@ -121,7 +121,7 @@ class SearchVideos extends HTMLElement {fetch(`/api/videos?filter=${encodeURIComponent(searchTerm)}${excluded ? '&excluded=true' : ''}${downloaded ? '&downloaded=true' : ''}${ignored ? '&ignored=true' : ''}${summarized ? '&summarized=true' : ''}`).then(res => res.json()).then((videos) => {- const $videosContainer = document.querySelector('.main-videos-container')+ const $videosContainer = document.querySelector(this.dataset.videosContainer || '.main-videos-container')if (!$videosContainer) return$videosContainer.innerHTML = ''const showOriginalThumbnail = store.get(store.showOriginalThumbnailKey)diff --git a/client/index.html b/client/index.htmlindex c757af9..4753ebb 100644--- a/client/index.html+++ b/client/index.html@@ -12,7 +12,7 @@<div class="flex space-between align-start p-1"><a id="home-link" class="hide p-v-2" href="/">go back home</a></h1><div class="flex-1 header-spacer"></div>- <search-videos></search-videos>+ <search-videos data-videos-container=".main-videos-container"></search-videos><div class="flex-1 tar p-v-2"><a href="/settings">Settings</a><a tabindex="-1" href="https://github.com/christian-fei/my-yt" target="_blank">📖</a>