summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2019-05-10 17:44:49 -0400
committerDaniel Micay <danielmicay@gmail.com>2019-05-10 17:45:43 -0400
commita229e9e9179ef43f0b0b8176916cfa494568d5c8 (patch)
treec455732bbc354fc58d5cdeeeed59a3471db0b578
parent2ed2ba8bf5547932d907f99946b88088546ab71d (diff)
remove code for handling missing tags
-rw-r--r--static/releases.html2
-rw-r--r--static/releases.js25
2 files changed, 8 insertions, 19 deletions
diff --git a/static/releases.html b/static/releases.html
index 88d547bb..6657f99c 100644
--- a/static/releases.html
+++ b/static/releases.html
@@ -350,6 +350,6 @@
<a href="https://github.com/GrapheneOS">GitHub</a>
</div>
</footer>
- <script src="/releases.js?7"></script>
+ <script src="/releases.js?8"></script>
</body>
</html>
diff --git a/static/releases.js b/static/releases.js
index 0ceec4fa..101f3133 100644
--- a/static/releases.js
+++ b/static/releases.js
@@ -3,16 +3,8 @@
const baseUrl = "https://seamlessupdate.app/";
const versionBaseUrl = "https://github.com/GrapheneOS/platform_manifest/releases/tag/";
const devices = ["crosshatch", "blueline", "taimen", "walleye", "marlin", "sailfish"];
-const snapshot = [];
const channels = ["stable", "beta"];
-function createLink(href, text) {
- const link = document.createElement("a");
- link.appendChild(document.createTextNode(text));
- link.href = href;
- return link;
-}
-
for (const channel of channels) {
for (const device of devices) {
fetch(baseUrl + device + "-" + channel).then(response => {
@@ -29,23 +21,20 @@ for (const channel of channels) {
const updateFilename = device + "-ota_update-" + metadata[0] + ".zip";
const updateUrl = baseUrl + updateFilename;
- const release = document.getElementById(device + "-" + channel);
-
const tag = metadata[2] + "." + metadata[0];
- const version = document.createElement("p");
- if (snapshot.includes(device)) {
- version.appendChild(document.createTextNode("Version: " + tag));
- } else {
- version.appendChild(document.createTextNode("Version: "));
- version.appendChild(createLink(versionBaseUrl + tag, tag));
- }
- release.replaceChild(version, release.getElementsByTagName("p")[0]);
+ const release = document.getElementById(device + "-" + channel);
const links = release.getElementsByTagName("a");
+
+ links[1].innerText = tag;
+ links[1].setAttribute("href", versionBaseUrl + tag);
+
links[2].innerText = factoryFilename;
links[2].setAttribute("href", factoryUrl);
+
links[3].innerText = factoryFilename + ".sig";
links[3].setAttribute("href", factoryUrl + ".sig");
+
links[4].innerText = updateFilename;
links[4].setAttribute("href", updateUrl);
});