mirror of
https://github.com/pi-hole/web.git
synced 2026-04-23 02:09:58 +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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user