From 4fad94b05622964d24a7574fc62e3a58552304f5 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Tue, 11 Mar 2025 11:35:33 -0400 Subject: [PATCH] fix release listing updates for legacy devices This will also be needed for experimental support for new devices so it's worth fixing it. --- static/js/releases.js | 6 ++++-- templates/device.html | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/static/js/releases.js b/static/js/releases.js index 24473af7..026cab33 100644 --- a/static/js/releases.js +++ b/static/js/releases.js @@ -27,10 +27,12 @@ async function updateReleases() { const updateUrl = baseUrl + updateFilename; const release = document.getElementById(`${device}-${channel}`); - const links = release.getElementsByTagName("a"); + const links = release.querySelectorAll("a, span"); links[0].textContent = metadata[0]; - links[0].setAttribute("href", "#" + metadata[0]); + if (links[0].nodeName == "A") { + links[0].setAttribute("href", "#" + metadata[0]); + } links[1].setAttribute("href", factoryUrl); links[2].setAttribute("href", factoryUrl + ".sig"); links[3].setAttribute("href", updateUrl); diff --git a/templates/device.html b/templates/device.html index 80d9b493..7f30dbe2 100644 --- a/templates/device.html +++ b/templates/device.html @@ -11,7 +11,7 @@ {% if not "extended" in name %} [[{{codename}}-stable-BUILD_NUMBER]] {% else %} - [[{{codename}}-stable-BUILD_NUMBER]] + [[{{codename}}-stable-BUILD_NUMBER]] {% endif %}