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:
XhmikosR
2019-12-10 10:15:20 +02:00
parent b198467bfc
commit 9c1846885a
17 changed files with 199 additions and 244 deletions

View File

@@ -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);
}