update releases links instead of replacing

This commit is contained in:
Daniel Micay 2019-05-10 17:16:37 -04:00
parent d72d8e83aa
commit 2ba653ca55
2 changed files with 7 additions and 5 deletions

View File

@ -322,6 +322,6 @@
<a href="https://github.com/GrapheneOS">GitHub</a>
</div>
</footer>
<script src="/releases.js?6"></script>
<script src="/releases.js?7"></script>
</body>
</html>

View File

@ -42,10 +42,12 @@ for (const channel of channels) {
release.replaceChild(version, release.getElementsByTagName("p")[0]);
const links = release.getElementsByTagName("a");
release.replaceChild(createLink(factoryUrl, factoryFilename), links[2]);
release.replaceChild(createLink(factoryUrl + ".sig", factoryFilename + ".sig"), links[3]);
release.replaceChild(createLink(updateUrl, updateFilename), links[4]);
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);
});
}
}