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

@@ -4,12 +4,15 @@
*
* This file is copyright under the latest version of the EUPL.
* Please see LICENSE file for your rights under this license. */
/* global ActiveXObject: false */
var exact = "";
function quietfilter(ta,data)
{
var lines = data.split("\n");
for(var i = 0;i<lines.length;i++)
for(var i = 0; i<lines.length; i++)
{
if(lines[i].indexOf("results") !== -1 && lines[i].indexOf("0 results") === -1)
{
@@ -96,7 +99,7 @@ function eventsource() {
}, false);
// Will be called when script has finished
source.addEventListener("error", function(e) {
source.addEventListener("error", function() {
source.close();
}, false);