Skip to content

Commit

Permalink
Merge pull request sourcegraph#43 from MrBri/master
Browse files Browse the repository at this point in the history
statuspage: .innerHTML undefined on dom.lastcheck, .remove() undefined
  • Loading branch information
mholt authored Jul 25, 2017
2 parents 7f3436f + b2e9707 commit ac6dcb4
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 ac6dcb4

Please sign in to comment.