More instant frontpage-loading, and sorting frontpages on the backend for consistency

This commit is contained in:
Kasper Rynning-Tønnesen
2018-08-10 11:51:28 +02:00
parent 8c29c31449
commit 6d0acaefcb
11 changed files with 147 additions and 90 deletions

View File

@@ -677,6 +677,12 @@ var Channel = {
var response = document.createElement("div");
response.innerHTML = e;
var newList = response.querySelector("#lists-script").innerHTML;
newList = newList.trim().replace("window.lists = ", "");
newList = newList.substring(0, newList.length);
window.lists = JSON.parse(newList);
response.querySelector("#lists-script").remove();
Helper.removeElement("#sidenav-overlay");
document.getElementsByTagName("main")[0].className = "center-align container";
Helper.removeClass("#main-container", "channelpage");