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> <a href="https://github.com/GrapheneOS">GitHub</a>
</div> </div>
</footer> </footer>
<script src="/releases.js?6"></script> <script src="/releases.js?7"></script>
</body> </body>
</html> </html>

View File

@ -42,10 +42,12 @@ for (const channel of channels) {
release.replaceChild(version, release.getElementsByTagName("p")[0]); release.replaceChild(version, release.getElementsByTagName("p")[0]);
const links = release.getElementsByTagName("a"); const links = release.getElementsByTagName("a");
links[2].innerText = factoryFilename;
release.replaceChild(createLink(factoryUrl, factoryFilename), links[2]); links[2].setAttribute("href", factoryUrl);
release.replaceChild(createLink(factoryUrl + ".sig", factoryFilename + ".sig"), links[3]); links[3].innerText = factoryFilename + ".sig";
release.replaceChild(createLink(updateUrl, updateFilename), links[4]); links[3].setAttribute("href", factoryUrl + ".sig");
links[4].innerText = updateFilename;
links[4].setAttribute("href", updateUrl);
}); });
} }
} }