Skip to content

Instantly share code, notes, and snippets.

@tmyt
Created December 27, 2010 17:39
Show Gist options
  • Save tmyt/756337 to your computer and use it in GitHub Desktop.
Save tmyt/756337 to your computer and use it in GitHub Desktop.
Azurea Script Sample (Require 1.3.2 Beta4 lator)
/*
Beta4で追加されたHTTP Post APIを使って診断メーカーをアプリないで解決してみるスクリプト。
*/
System.addContextMenuHandler('診断メーカー', 0, function(id){
var status = TwitterService.status.get(id);
var curUsr = TwitterService.currentUser();
if(status.text.match('http://shindanmaker.com/[0-9]+')){
var resp = Http.postRequest(RegExp.lastMatch, "u="+encodeURI(curUsr.screen_name), false);
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