diff options
| author | Daniel Micay <daniel.micay@grapheneos.org> | 2024-10-12 09:42:41 -0400 |
|---|---|---|
| committer | Daniel Micay <daniel.micay@grapheneos.org> | 2024-10-12 09:42:41 -0400 |
| commit | b61454e13c2c14f17564c5951a90c30f613ddb13 (patch) | |
| tree | a6ea55eb192ad1d628a50c865ae05378134dcdb2 /static/js | |
| parent | c0f61009219020c701ab7e11f2f56cd18ae4fcde (diff) | |
overhaul layout of release list
Diffstat (limited to 'static/js')
| -rw-r--r-- | static/js/releases.js | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/static/js/releases.js b/static/js/releases.js index 5fbf664a..ec69275c 100644 --- a/static/js/releases.js +++ b/static/js/releases.js @@ -6,11 +6,6 @@ const legacyFactoryDevices = new Set(["sunfish", "coral", "flame"]); const channels = ["stable", "beta", "alpha"]; const delayMs = 1000 * 60 * 5; -function updateLink(link, text, url) { - link.innerText = text; - link.setAttribute("href", url); -} - async function updateReleases() { const requests = []; @@ -34,10 +29,10 @@ async function updateReleases() { const release = document.getElementById(`${device}-${channel}`); const links = release.getElementsByTagName("a"); - updateLink(links[1], metadata[0], "#" + metadata[0]); - updateLink(links[2], factoryFilename, factoryUrl); - updateLink(links[3], factoryFilename + ".sig", factoryUrl + ".sig"); - updateLink(links[4], updateFilename, updateUrl); + links[0].setAttribute("href", "#" + metadata[0]); + links[1].setAttribute("href", factoryUrl); + links[2].setAttribute("href", factoryUrl + ".sig"); + links[3].setAttribute("href", updateUrl); })); } } |
