From: Andrew Dolgov Date: Sun, 14 Nov 2010 13:15:51 +0000 (+0300) Subject: getSelectedFeedsFromBrowser: code cleanup X-Git-Tag: 1.5.0~226 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=3c8e3b1572c55708741191c45a2e5c1e6028b8cb;p=tt-rss.git getSelectedFeedsFromBrowser: code cleanup --- diff --git a/functions.js b/functions.js index 2e7412c2..8428af39 100644 --- a/functions.js +++ b/functions.js @@ -871,22 +871,18 @@ function remove_splash() { function getSelectedFeedsFromBrowser() { - var list = $("browseFeedList"); + var list = $$("#browseFeedList li[id*=FBROW]"); var selected = new Array(); - - for (i = 0; i < list.childNodes.length; i++) { - var child = list.childNodes[i]; - if (child.id && child.id.match("FBROW-")) { - var id = child.id.replace("FBROW-", ""); - - var cb = $("FBCHK-" + id); - - if (cb.checked) { - selected.push(id); - } - } - } + + list.each(function(child) { + var id = child.id.replace("FBROW-", ""); + var cb = $("FBCHK-" + id); + + if (cb.checked) { + selected.push(id); + } + }); return selected; }