summaryrefslogtreecommitdiff
path: root/feedlist.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-25 13:20:37 +0300
committerAndrew Dolgov <[email protected]>2010-11-25 13:23:37 +0300
commit563b9c782d0cfbcebd7686cd2fce202d874ec9df (patch)
tree23853655de85a27f44c9cc56729c554eb2bc7637 /feedlist.js
parentba7e88e5a59295ac3eed38ea627e9fa2a414b989 (diff)
remove xml from getAllCounters rpc call, use pure JSON
Diffstat (limited to 'feedlist.js')
-rw-r--r--feedlist.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/feedlist.js b/feedlist.js
index e47567a81..b475b9c55 100644
--- a/feedlist.js
+++ b/feedlist.js
@@ -232,7 +232,7 @@ function request_counters_real() {
parameters: query,
onComplete: function(transport) {
try {
- handle_rpc_reply(transport);
+ handle_rpc_json(transport);
} catch (e) {
exception_error("viewfeed/getcounters", e);
}
@@ -286,13 +286,11 @@ function displayNewContentPrompt(id) {
}
}
-function parse_counters(reply, scheduled_call) {
+function parse_counters(elems, scheduled_call) {
try {
var feeds_found = 0;
- var elems = JSON.parse(reply.firstChild.nodeValue);
-
for (var l = 0; l < elems.length; l++) {
var id = elems[l].id
@@ -302,7 +300,7 @@ function parse_counters(reply, scheduled_call) {
var has_img = elems[l].has_img;
var updated = elems[l].updated;
var title = elems[l].title;
-
+
if (id == "global-unread") {
global_unread = ctr;
updateTitle();