fix footer

master
Drake 2 years ago
parent b7f58bf51d
commit e08185aceb

@ -1,11 +1,15 @@
async function getFooter(footerPath) {
function getFooter(footerPath) {
if (footerPath === undefined) {
//why the hell does js not have optional parameters for functions?
footerPath = "/footer.html";
footerPath = "/footer.html"
}
console.log("sanity check much?");
console.log(footerPath)
footer = await fetch(footerPath);
footer = await footer.text();
document.getElementById("footer").innerHTML = footer;
//footer = await fetch(footerPath);
//footer = await footer.text();
// I have to use XMLHttpRequest for some godforsaken reason (to support IE)
var req = new XMLHttpRequest()
var onload = function() {
document.getElementById("footer").innerHTML = this.responseText;
}
req.addEventListener("load", onload)
req.open("GET", window.location.origin + footerPath)
req.send()
}

Loading…
Cancel
Save