mirror of
https://github.com/Investigamer/cardconjurer.git
synced 2025-07-26 21:04:58 -05:00
php
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
function includeHTML() {
|
||||
var elementList = document.getElementsByTagName('*');
|
||||
for (var i = 0; i < elementList.length; i ++) {
|
||||
element = elementList[i];
|
||||
var file = element.getAttribute('html-include');
|
||||
if (file) {
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4) {
|
||||
if (this.status == 200) {
|
||||
element.innerHTML = this.responseText;
|
||||
} else if (this.status == 404) {
|
||||
element.innerHTML = 'HTML inclusion not found';
|
||||
}
|
||||
element.removeAttribute('html-include');
|
||||
includeHTML();
|
||||
}
|
||||
}
|
||||
xhttp.open('GET', file, true);
|
||||
xhttp.send();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user