mirror of
https://github.com/driftywinds/driftywinds.github.io.git
synced 2025-12-19 11:03:32 +00:00
16 lines
449 B
JavaScript
16 lines
449 B
JavaScript
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();
|
|
}); |