A clean and minimal youtube frontend, without all the ads and whistles
JavaScript
fix: make sure elements exist before setting text about downloading and summarizing
Christian Fei4a292b51c772
diff --git a/client/components/video-element.js b/client/components/video-element.jsindex c7c7b02..fb4d3d5 100644--- a/client/components/video-element.js+++ b/client/components/video-element.js@@ -25,12 +25,12 @@ class VideoElement extends HTMLElement {this.video = JSON.parse(this.dataset['data'])this.render()}- if (name === 'data-summarizing') {- this.querySelector('.action.summarize').innerText = this.summaryStartedText- }- if (name === 'data-downloading') {+ if (name === 'data-downloading' && this.querySelector('.action.download')) {this.querySelector('.action.download').innerText = this.downloadStartedText}+ if (name === 'data-summarizing' && this.querySelector('.action.summarize')) {+ this.querySelector('.action.summarize').innerText = this.summaryStartedText+ }}render () {if (!this.video) return