Skip to content

Instantly share code, notes, and snippets.

@tmyt
Created Feb 17, 2011
Embed
What would you like to do?
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