mirror of
https://github.com/pi-hole/web.git
synced 2026-04-25 03:10:18 +01:00
Clean up JS
* remove unused variables/functions * use the dot notation * use explicit coercion * remove unneeded else * use `textContent` instead of `innerHTML` * cache a few `getElementById` calls * fix a couple of undefined variables * various assorted lint tweaks Signed-off-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
/* global ActiveXObject: false */
|
||||
|
||||
// Credit: http://stackoverflow.com/a/10642418/2087442
|
||||
function httpGet(ta,theUrl)
|
||||
{
|
||||
@@ -53,7 +55,7 @@ function eventsource() {
|
||||
}, false);
|
||||
|
||||
// Will be called when script has finished
|
||||
source.addEventListener("error", function(e) {
|
||||
source.addEventListener("error", function() {
|
||||
source.close();
|
||||
}, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user