Adora Laura Kalb
7f2f3d8700
All checks were successful
ci/woodpecker/push/deploy-rsync Pipeline was successful
30 lines
719 B
JavaScript
30 lines
719 B
JavaScript
async function FillLatestForgejoRelease() {
|
|
|
|
const apiPath = `https://forgejo-proxy.services-prod.lila.network/api/v1/code.lila.network/releases`
|
|
|
|
|
|
var forgejoItems = document.getElementsByClassName('forgejo-version')
|
|
|
|
const requestOptions = {
|
|
method: "GET",
|
|
redirect: "follow",
|
|
|
|
};
|
|
|
|
[...forgejoItems].forEach(async item => {
|
|
var repo = item.getAttribute("data-forgejo-repo");
|
|
|
|
var queryParam = new URLSearchParams({ namespace: repo }).toString()
|
|
|
|
|
|
var response = await fetch(`${apiPath}?${queryParam}`, requestOptions)
|
|
|
|
if (response.ok) {
|
|
|
|
item.textContent = await response.text()
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
FillLatestForgejoRelease()
|