10/12/11 19:59:08 oaHFEXdp0
ああ、RequestPolicyがリダイレクトの制御もしてたんだ・・・
VimpからRequestPolicy操作したくてちょっと調べてたら気づいた
と、言うわけで、VimpからRequestPolicyを操作する方法分かったから、せっかくなんで載せます
これで >>31 もVimp本格導入できるね
"" アドオンRequestPolicyの操作
" 操作用ポップアップ表示を<Leader>rで
javascript <<EOM
mappings.addUserMap(
[modes.NORMAL],
["<Leader>r"],
"Open RequestPolicy Popup",
function(){
var s = document.getElementById('requestpolicyStatusbar');
var p = document.getElementById('requestpolicyStatusbarPopup');
// Add the menupopup to the statusbar as it may be attached to the contextmenu.
s.insertBefore(p,null);
p.openPopup(s, 'before_start',0,0,true,true);
}
);
EOM
" リダイレクトの時の許可ボタンをgrrで、オプションをgroで
nnoremap <silent> grr :js gBrowser.getNotificationBox().currentNotification.getElementsByAttribute('label', '許可')[0].click()<CR>
nnoremap <silent> gro :js gBrowser.getNotificationBox().currentNotification.getElementsByAttribute('label', 'オプション')[0].click()<CR>