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.
This commit is contained in:
Daniel Micay
2019-05-07 07:46:06 -04:00
parent 3967167b86
commit 8571e82cc4
2 changed files with 92 additions and 11 deletions

View File

@@ -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);
});
}
}