Skip to content

Instantly share code, notes, and snippets.

@tmyt
Created January 6, 2011 10:14
Show Gist options
  • Save tmyt/767731 to your computer and use it in GitHub Desktop.
Save tmyt/767731 to your computer and use it in GitHub Desktop.
Azurea Script Sample
/*
選択されたユーザのホームからPost数を探してきて表示してみる
*/
System.addContextMenuHandler('Get tweets count', 0, function(id){
var st = TwitterService.status.get(id);
var html = Http.downloadString("http://twitter.com/" + st.user.screen_name);
if(html.match('<span id="update_count" class="stat_count">([0-9,]+)</span>')){
System.showNotice("@" + st.user.screen_name + "'s total tweets: " + RegExp.$1);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment