Some more IE compatibility tricks

This commit is contained in:
DL6ER
2017-01-13 15:39:28 +01:00
parent a7261bd157
commit d597b52f49
3 changed files with 26 additions and 11 deletions

View File

@@ -2,6 +2,13 @@ function eventsource() {
var alInfo = $("#alInfo");
var alSuccess = $("#alSuccess");
var ta = $("#output");
// IE does not support EventSource - exit early
if (typeof EventSource !== "function") {
ta.show();
ta.html("Updating lists of ad-serving domains is not supported with this browser!");
return;
}
var source = new EventSource("scripts/pi-hole/php/gravity.sh.php");
ta.html("");
@@ -27,7 +34,7 @@ function eventsource() {
}, false);
}
$("#gravityBtn").on("click", () => {
$("#gravityBtn").on("click", function(){
$("#gravityBtn").attr("disabled", true);
eventsource();
});