diff options
author | mattn | 2008-05-09 04:14:38 +0000 |
---|---|---|
committer | mattn | 2008-05-09 04:14:38 +0000 |
commit | 79cf6591ca2c3f242b2ebb6c38048d4ee1b974a0 (patch) | |
tree | fea8b08f2769bef399dbb6117df63619425eac40 /twitterView.js | |
parent | 060dc6b811c86dcde4bbabbd9eced4412f9d1381 (diff) | |
download | vimperator-plugins-79cf6591ca2c3f242b2ebb6c38048d4ee1b974a0.tar.bz2 |
* ,fでfav
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@11289 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'twitterView.js')
-rw-r--r-- | twitterView.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/twitterView.js b/twitterView.js index cbd27d6..7db6c63 100644 --- a/twitterView.js +++ b/twitterView.js @@ -1,5 +1,5 @@ // Vimperator plugin: 'Statusbar Twitter'
-// Last Change: 23-Apr-2008. Jan 2008
+// Last Change: 09-May-2008. Jan 2008
// License: Creative Commons
// Maintainer: Trapezoid <trapezoid.g@gmail.com> - http://unsigned.g.hatena.ne.jp/Trapezoid
//
@@ -63,6 +63,15 @@ setInterval(checkTimeline ,checkTime);
setInterval(updateTimeline ,updateTime);
+ function favoriteStatus(id){
+ var xhr = new XMLHttpRequest();
+ xhr.onreadystatechange = function(){
+ if(xhr.readyState == 4 && xhr.status != 200)
+ liberator.echoerr("Twitter Viewer: faild to favorite");
+ };
+ xhr.open("GET","http://twitter.com/favourings/create/" + id,true,username,password);
+ xhr.send(null);
+ }
function checkTimeline(){
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function(){
@@ -96,4 +105,7 @@ liberator.mappings.addUserMap([liberator.modes.NORMAL], [",r"],
"Reply to current user",
function () { liberator.commandline.open(":", "twitter @" + lastestStatus.user.screen_name + " ", liberator.modes.EX); });
+ liberator.mappings.addUserMap([liberator.modes.NORMAL], [",f"],
+ "Favorite to current user",
+ function () { favoriteStatus(lastestStatus.id) });
})();
|