From b4b7483f2ef46751a2e9ca96fc310d7de0c4d79a Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Sun, 23 Sep 2012 17:08:27 +0000 Subject: [PATCH] in updateFilesPage(), fix about a dozen variables that leaked into the global namespace --- web/javascript/inspector.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/javascript/inspector.js b/web/javascript/inspector.js index 69b563158..b4e29e6ab 100644 --- a/web/javascript/inspector.js +++ b/web/javascript/inspector.js @@ -491,7 +491,9 @@ function Inspector(controller) { }, updateFilesPage = function() { - var i, n, sel, row, tor, fragment, + var i, j, n, sel, row, tor, fragment, + box, complete, conn, connections, e, from, heirarchy, item, + matches, parents, parentid, path, sum, subheirarchy, to, inner, file_list = data.elements.file_list, torrents = data.torrents; @@ -617,7 +619,7 @@ function Inspector(controller) { for (parentid in parents) { $($('.inspector_torrent_file_list_entry_name',$('#'+parentid))[0]).click(function() { $($(this).parent()).children('li').toggle(); }) - sum = 0 + sum = 0; matches = $('#'+parentid).children('li').text().match(/\([^\.]+\)/g) if (matches == null) { continue; } matches.map(function(word) {return parseFloat(word.slice(1,-2)) }).map(function(perc) {sum+=perc})