pub / yt2html

Fetches Youtube content via RSS and provides a chronological timeline
git clone https://src.jayvii.de/pub/yt2html.git
Home | Log | Files | Exports | Refs | README | RSS

commit 9dec78021a96516bce5dfeec6f616089f1c5f738
parent b1654195a5cb8e6847a776557c29fec897c3eeb9
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Tue, 10 Nov 2026 18:32:43 +0100

fix: runtime fixes

Diffstat:
Massets/js/yt.js | 4++--
Mindex.php | 7++++---
2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/assets/js/yt.js b/assets/js/yt.js @@ -108,7 +108,7 @@ function create_video_box(data) { // Create section object from invisible template var vid = document.querySelector("#video_template").cloneNode(true); vid.id = "video_" + data["vid"]; - vid.data = data["time"]; + vid.setAttribute("data", data["time"]); // Update Headline Text and Link vid.querySelector(".title").innerText = data["title"]; @@ -169,7 +169,7 @@ async function fetch_and_insert_yt(channel) { for (let j = 0; j < vids.length; j++) { // If a video has a smaller (earlier) timestamp, put the video BEFORE it - if (vids[j].data < vid[data]) { + if (vids[j].getAttribute("data") < vid.getAttribute("data")) { vids[j].prepend(vid); break; } diff --git a/index.php b/index.php @@ -223,8 +223,9 @@ <script> <?php foreach ($channels as $channel) { - echo "setTimeout(function() { fetch_and_insert_yt('" . - $channel . "') }, 500);"; + // echo "setTimeout(function() { fetch_and_insert_yt('" . + // $channel . "') }, 500);"; + echo "fetch_and_insert_yt('" . $channel . "');"; } ?> </script> @@ -253,7 +254,7 @@ <!-- player Container --> <div class="player_container hidden"> - <button class="play_button">Toggle Player</button> + <button class="toggle_video">Toggle Player</button> </div> <!-- Preview Image -->