if(window.location['pathname'] == "/post.html"){ loadPost(); } // return the value of the get parameter with the given name function getParameter(name) { name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var regex = new RegExp("[\\?&]" + name + "=([^]*)"); var results = regex.exec(location.search); return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); } async function loadPost() { let id = getParameter("id"); let header = document.createElement("jl-header"); let footer = document.createElement("jl-footer"); let content = document.createElement("div"); if(id == null) { content.innerHTML = "