Created
September 18, 2008 05:49
-
-
Save snaka/11383 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Twitter をチラ見 (Simplest twitter reader) | |
*/ | |
CmdUtils.CreateCommand({ | |
name: "tirami-twitter", | |
preview: function(pblock){ | |
jQuery.get("http://twitter.com/statuses/friends_timeline.json", {count:15}, function(data){ | |
var messages = []; | |
messages.push("<div style='font-size:0.7em'>"); | |
for( var i = 0; i < data.length; i++) { | |
messages.push( | |
'<img src="' + data[i].user.profile_image_url + '" style="width:1.5em;"/>' + | |
'<b>»' + | |
data[i].user.screen_name + | |
'</b>: ' + | |
data[i].text); | |
} | |
messages.push("</div>"); | |
pblock.innerHTML = messages.join('<br/>'); | |
},"json"); | |
}, | |
execute: function(){/* DO NOTHING */} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment