From ec63339ae5258509cf7a8829d4dd79519948c256 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sun, 28 Oct 2018 22:38:20 +0100 Subject: Add missing variable declarations in JavaScript code This fixes errors reported by LGTM. Signed-off-by: Stefan Weil --- applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'applications/luci-app-aria2/luasrc/view') diff --git a/applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm b/applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm index b14cca228..66db6ce55 100644 --- a/applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm +++ b/applications/luci-app-aria2/luasrc/view/aria2/overview_status.htm @@ -24,7 +24,7 @@ function randomString(len) { var $chars = 'abcdefghijklmnopqrstuvwxyz1234567890'; var maxPos = $chars.length; var pwd = ''; - for (i = 0; i < len; i++) { + for (var i = 0; i < len; i++) { pwd += $chars.charAt(Math.floor(Math.random() * maxPos)); } return pwd; @@ -41,6 +41,7 @@ function showRPCURL() { var newTextNode = document.getElementById("aria2rpcpath"); var auth_method = document.getElementById("cbid.aria2.main.rpc_auth_method"); var auth_port = document.getElementById("cbid.aria2.main.rpc_listen_port"); + var auth_port_value; if (auth_port.value == "") { auth_port_value = "6800" } else { -- cgit v1.2.3