From ec4283317ba113f8745c2a71ea23e83f20d56ecf Mon Sep 17 00:00:00 2001 From: anekos Date: Fri, 30 Jul 2010 14:34:27 +0000 Subject: マージミス修正 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@38059 d0d07461-0603-4401-acd4-de1884942a52 --- twittperator.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'twittperator.js') diff --git a/twittperator.js b/twittperator.js index cf43f88..9601ea9 100755 --- a/twittperator.js +++ b/twittperator.js @@ -1311,7 +1311,7 @@ function getFollowersStatus(target, force, onload) { // {{{ clearTimeout(statusRefreshTimer); statusRefreshTimer = setTimeout(function() expiredStatus = true, statusValidDuration * 1000); } - if (!force && !expiredStatus && statuses.length > 0){ + if (!force && !expiredStatus && history.length > 0){ onload(); } else { let api = "http://api.twitter.com/1/statuses/home_timeline.json", @@ -1328,9 +1328,9 @@ function getFollowersStatus(target, force, onload) { // {{{ onload(); }); } -} +} // }}} function showFollowersStatus(arg, force) { // {{{ - getFollowersStatus(arg, force, function(text) { + getFollowersStatus(arg, force, function(statuses) { showTL(statuses); }); } // }}} @@ -1339,8 +1339,7 @@ function showTwitterMentions(arg) { // {{{ if (/^@/.test(arg)) arg = arg.substr(1); tw.get("http://api.twitter.com/1/statuses/mentions.json", null, function(text) { - statuses = JSON.parse(text); - showTL(statuses); + showTL(JSON.parse(text)); }); } // }}} function favTwitter(id) { // {{{ @@ -1433,16 +1432,19 @@ function setup() { // {{{ }; if (args.bang && !/^[-+]/.test(args[0])){ + liberator.log(1); targetContext.title = ["Name","Entry"]; list = history.map(function(s) ("retweeted_status" in s) ? - ["@" + s.retweeted_status.user.screen_name, s ] : - ["@" + s.user.screen_name, s.text]); + ["@" + s.retweeted_status.user.screen_name, s] : + ["@" + s.user.screen_name, s]); } else if (/(?:^|\b)RT\s+@[A-Za-z0-9_]{1,15}$/.test(args[0])){ + liberator.log(2); targetContext.title = ["Name + Text"]; list = history.map(function(s) ("retweeted_status" in s) ? ["@"+s.retweeted_status.user.screen_name+"#"+s.retweeted_status.id+": "+s.retweeted_status.text, s] : ["@"+s.user.screen_name+"#"+s.id+": "+s.text, s]); } else { + liberator.log(3); targetContext.title = ["Name#ID","Entry"]; list = history.map(function(s) ("retweeted_status" in s) ? ["@"+s.retweeted_status.user.screen_name+"#"+s.retweeted_status.id+" ", s] : -- cgit v1.2.3