Skip to content

Commit

Permalink
feat(IE 11): .innHTML undefined on dom.lastcheck
Browse files Browse the repository at this point in the history
Also .remove() undefined
  • Loading branch information
Tyler Briles committed Nov 4, 2016
1 parent 00c9490 commit b2e9707
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions statuspage/js/statuspage.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
// config.js must be included BEFORE this file!

// IE 11 Polyfill for .remove()
if (!('remove' in Element.prototype)) {
Element.prototype.remove = function() {
if (this.parentNode) {
this.parentNode.removeChild(this);
}
};
}
// Configure access to storage
checkup.storage.setup(checkup.config.storage);

Expand All @@ -15,12 +23,12 @@ document.addEventListener('DOMContentLoaded', function() {
checkup.dom.checkcount = document.getElementById("info-checkcount");
checkup.dom.lastcheck = document.getElementById("info-lastcheck");
checkup.dom.timeline = document.getElementById("timeline");
// Immediately begin downloading check files, and keep page updated
checkup.storage.getChecksWithin(checkup.config.timeframe, processNewCheckFile, allCheckFilesLoaded);

if (!checkup.graphsMade) makeGraphs();
}, false);

// Immediately begin downloading check files, and keep page updated
checkup.storage.getChecksWithin(checkup.config.timeframe, processNewCheckFile, allCheckFilesLoaded);
setInterval(function() {
checkup.storage.getNewChecks(processNewCheckFile, allCheckFilesLoaded);
}, checkup.config.refresh_interval * 1000);
Expand Down

0 comments on commit b2e9707

Please sign in to comment.