Skip to content

armgit / my-yt

Public Imported from GitHub
0

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

JavaScript

show summary and transcript

Christian Fei498d66f06a5f
diff --git a/client/main.js b/client/main.js
index 9d8cd8d..218c241 100644
--- a/client/main.js
+++ b/client/main.js
@@ -383,7 +383,7 @@ function showSummaryHandler (event) {
const video = videos.find(video => video.id === videoId)
if (video) {
document.querySelector('dialog#summary').showModal()
- document.querySelector('dialog#summary div').innerText = video.summary
+ document.querySelector('dialog#summary div').innerHTML = `<pre>${video.summary}</pre><details><summary>transcript</summary><pre>${video.transcript}</pre></details>`
return
}
}