A clean and minimal youtube frontend, without all the ads and whistles
JavaScript
fix: put not ignored videos first
Christian Fei7c9d5dafca6f
diff --git a/lib/repository.js b/lib/repository.jsindex 0a53d0b..17952ca 100644--- a/lib/repository.js+++ b/lib/repository.js@@ -34,6 +34,8 @@ export default class Repository {getVideos () {return this.videos.sort((a, b) => +new Date(b.publishedAt) - +new Date(a.publishedAt))+ // put not ignored video first+ .sort((a, b) => (b.ignored ? -1 : 0) + (a.ignored ? 1 : 0)).filter((_, i) => i < 500)}getVideo(id) {