Initial commit

This commit is contained in:
foxster-mp4
2023-04-27 20:27:37 -07:00
commit d35389cc9a
18 changed files with 1468 additions and 0 deletions

16
js/news.js Normal file
View File

@@ -0,0 +1,16 @@
addNavigationBar("All News");
fetch(sourceURL)
.then(response => response.json())
.then(json => {
if (json.tintColor) setTintColor(json.tintColor)
document.title = `News - ${json.name}`;
json.news.sort((a, b) => (new Date(b.date)).valueOf() - (new Date(a.date)).valueOf());
json.news.forEach(news =>
document.getElementById("news").insertAdjacentHTML("beforeend", newsItemHTML(news, json.apps))
);
waitForAllImagesToLoad();
});