]> git.wh0rd.org Git - tt-rss.git/commitdiff
getSelectedFeedsFromBrowser: code cleanup
authorAndrew Dolgov <fox@fakecake.org>
Sun, 14 Nov 2010 13:15:51 +0000 (16:15 +0300)
committerAndrew Dolgov <fox@fakecake.org>
Sun, 14 Nov 2010 13:15:51 +0000 (16:15 +0300)
functions.js

index 2e7412c239cef75a668caec6bbdbe6b0f209841f..8428af39e3b0d64cad463b64df8c58459d4d9dee 100644 (file)
@@ -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;
 }