Skip to content

Instantly share code, notes, and snippets.

@tmyt
Created February 17, 2011 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmyt/831901 to your computer and use it in GitHub Desktop.
Save tmyt/831901 to your computer and use it in GitHub Desktop.
Azurea Script Sample
/*
診断メーカーする拡張(https://gist.github.com/756337)の非同期版。
Require: API Level >= 9
*/
System.addContextMenuHandler('診断メーカー', 0, function(id){
var status = TwitterService.status.get(id);
var curUsr = TwitterService.currentUser();
if(status.text.match('http://shindanmaker.com/[0-9]+')){
Http.postRequestAsync(RegExp.lastMatch, "u="+encodeURI(curUsr.screen_name), false, function(resp){
resp.body.match('<textarea.*?>(.*?)</textarea>');
TextArea.text = RegExp.$1;
TextArea.in_reply_to_status_id = 0;
TextArea.show();
TextArea.setFocus();
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment