summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2011-08-28 16:23:16 (GMT)
committer Michael Krelin <hacker@klever.net>2011-08-28 16:23:16 (GMT)
commit63b7d8b9cd7b4c4fd010a46bb2737a47d5afa65e (patch) (side-by-side diff)
tree3533952c3632c34b25c399c2d9b6cf586d1cd4b0
parente58247a43552504e34ae31a5262a8a9dd338243c (diff)
downloadfireflix-63b7d8b9cd7b4c4fd010a46bb2737a47d5afa65e.zip
fireflix-63b7d8b9cd7b4c4fd010a46bb2737a47d5afa65e.tar.gz
fireflix-63b7d8b9cd7b4c4fd010a46bb2737a47d5afa65e.tar.bz2
more jsonification (is this code ever used?)
Signed-off-by: Michael Krelin <hacker@klever.net>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--content/fireflix.js18
1 files changed, 6 insertions, 12 deletions
diff --git a/content/fireflix.js b/content/fireflix.js
index d70ab4d..34cfd3e 100644
--- a/content/fireflix.js
+++ b/content/fireflix.js
@@ -233,22 +233,16 @@ var fireflix = {
refresh_user_tags: function() {
var lb = document.getElementById('tagslist');
- var _this = this;
- this.flickr.api_call(
+ var that = this;
+ this.flickr.api_call_json(
{
method: 'flickr.tags.getListUser',
auth_token: 'default',
- }, function(xr) {
- var x = xr.responseXML;
- var xp = x.evaluate(
- '/rsp/who/tags/tag', x, null,
- XPathResult.ORDERED_NODE_ITERATOR_TYPE, null );
- // TODO: clear list
- var n; while(n=xp.iterateNext()) {
- lb.appendItem(n.firstChild.nodeValue);
- }
+ }, function(x,j) {
+ var tt = j.who.tags.tag;
+ for(var i in tt) lb.appendItem(tt[i]._content);
}, function(x,s,c,m) {
- _this.flickr_failure(x,s,c,m);
+ that.flickr_failure(x,s,c,m);
}
);
},