diff options
author | anekos | 2010-08-04 14:44:03 +0000 |
---|---|---|
committer | anekos | 2010-08-04 14:44:03 +0000 |
commit | fbde07c70ad1929aadc6eca75be2b1aca81cdec5 (patch) | |
tree | 0188cc9e6645e832f4a7612afb054d73d93a9022 /twittperator.js | |
parent | 99b3c54697ba727514ef541a6f07badedfb02158 (diff) | |
download | vimperator-plugins-fbde07c70ad1929aadc6eca75be2b1aca81cdec5.tar.bz2 |
Twitter 検索が使えていなかったのを修正した
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@38171 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'twittperator.js')
-rwxr-xr-x | twittperator.js | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/twittperator.js b/twittperator.js index 6283544..28193e4 100755 --- a/twittperator.js +++ b/twittperator.js @@ -1232,9 +1232,20 @@ return str; } // }}} function showTwitterSearchResult(word) { // {{{ + // フォーマットが違うの変換 + function konbuArt(obj) { + return { + __proto__: obj, + user: { + __proto__: obj, + screen_name: obj.from_user, + id: obj.from_id + } + }; + } + tw.get("http://search.twitter.com/search.json", { q: word }, function(text) { - let results = JSON.parse(text); - showTL(results); + showTL(JSON.parse(text).results.map(konbuArt)); }); } // }}} function getFollowersStatus(target, force, onload) { // {{{ |