aboutsummaryrefslogtreecommitdiffstats
path: root/twittperator.js
diff options
context:
space:
mode:
authoranekos2010-08-04 14:44:03 +0000
committeranekos2010-08-04 14:44:03 +0000
commitfbde07c70ad1929aadc6eca75be2b1aca81cdec5 (patch)
tree0188cc9e6645e832f4a7612afb054d73d93a9022 /twittperator.js
parent99b3c54697ba727514ef541a6f07badedfb02158 (diff)
downloadvimperator-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-xtwittperator.js15
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) { // {{{