You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
481 B
16 lines
481 B
function getFooter(footerPath) {
|
|
if (footerPath === undefined) {
|
|
footerPath = "/footer.html"
|
|
}
|
|
//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()
|
|
}
|