Skip to content
Snippets Groups Projects
Commit 71aea24d authored by Jonas Leder's avatar Jonas Leder
Browse files

remove includeHTML

parent 9cb1b36a
No related branches found
No related tags found
No related merge requests found
Pipeline #1644 passed
let z = document.getElementsByTagName("*");
for (let i = 0; i < z.length; i++) {
let element = z[i];
let externalFileURL = element.getAttribute("includeHTML");
if (externalFileURL) {
let xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (this.readyState == 4) {
if (this.status == 200) { element.innerHTML = this.responseText; }
if (this.status == 404) { element.innerHTML = "Page not found."; }
element.removeAttribute("includeHTML");
}
}
xhr.open("GET", externalFileURL, true);
xhr.send();
}
}
...@@ -2,7 +2,6 @@ require("./browserCheck"); ...@@ -2,7 +2,6 @@ require("./browserCheck");
require("./error"); require("./error");
require("./imgPreview"); require("./imgPreview");
require("./includeHTML");
require("./viewPost"); require("./viewPost");
require("./externalLinkHandler"); require("./externalLinkHandler");
require("./prism"); require("./prism");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment