From 8571e82cc4b97209624e353c29ff6490c884befa Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Tue, 7 May 2019 07:46:06 -0400 Subject: add preformatted list of devices This avoids having the length of the page drastically changed, improving the user experience especially in browsers that are otherwise unable to provide a proper link to an anchor below this. --- static/releases.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'static/releases.js') diff --git a/static/releases.js b/static/releases.js index b5d934cb..cb7adae9 100644 --- a/static/releases.js +++ b/static/releases.js @@ -76,14 +76,8 @@ for (const channel of channels) { release.appendChild(document.createElement("br")); release.appendChild(createLink(updateUrl, updateFilename)); - const list = document.getElementById(channel); - for (const item of list.children) { - if (model > item.dataset.model) { - list.insertBefore(release, item); - return; - } - } - list.appendChild(release); + const div = document.getElementById(device + "-" + channel); + div.parentNode.replaceChild(release, div); }); } } -- cgit v1.3.1