diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2019-05-07 07:46:06 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2019-05-07 07:52:38 -0400 |
| commit | 8571e82cc4b97209624e353c29ff6490c884befa (patch) | |
| tree | 2a47e14587f8d94adeabb7eb83c37b989ac93e41 /static/releases.js | |
| parent | 3967167b8614df9c43e2240c3138eddc2e49abd2 (diff) | |
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.
Diffstat (limited to 'static/releases.js')
| -rw-r--r-- | static/releases.js | 10 |
1 files changed, 2 insertions, 8 deletions
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); }); } } |
