From fe42c6285da140932879a057fd51ec4f0427cace Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Wed, 19 Sep 2012 05:28:13 +0000 Subject: [PATCH] (trunk, web) r13437 regex bugfix by cfpp2p --- web/javascript/inspector.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/javascript/inspector.js b/web/javascript/inspector.js index f8395b4c9..69b563158 100644 --- a/web/javascript/inspector.js +++ b/web/javascript/inspector.js @@ -618,10 +618,10 @@ function Inspector(controller) { $($('.inspector_torrent_file_list_entry_name',$('#'+parentid))[0]).click(function() { $($(this).parent()).children('li').toggle(); }) sum = 0 - matches = $('#'+parentid).children('li').text().match(/\([^\)]+\)/g) + 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}) - count = $('#'+parentid).children('li').text().match(/\([^\)]+\)/g).length + count = $('#'+parentid).children('li').text().match(/\([^\.]+\)/g).length totalcomplete = (sum/count).toFixed(1) $($('.inspector_torrent_file_list_entry_progress',$('#'+parentid))[0]).text('('+totalcomplete+'%)')