DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

IE�クリックメニュー�拡張

02.11.2006
| 676 views |
  • submit to reddit
        
ブラウザ��クリックメニュー����
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\英辞郎�検索(&E)]
"Contexts"=dword:00000030
@="C:\\myIEMenu\\search_by_alc.html"

定義ã?—ã?ŸHTMLファイルã?®ä¸­ã?«ã€?実際行ã?„ã?Ÿã?„処ç?†ã‚’書ã??。
search_by_alc.html�中身
<script language="JavaScript">
q=(external.menuArguments.document.frames.length?'':external.menuArguments.document.selection.createRange().text);
for(i=0;i<external.menuArguments.document.frames.length;i++){
  q=external.menuArguments.document.frames[i].document.selection.createRange().text;
  if(q!='')break;
}
if(q=='')void(q=prompt('��キーワードを英辞郎�検索',''));
q=q.replace(/^[  ]+/g,'');
q=q.replace(/[  ]+$/g,'');
if(q)void(external.menuArguments.open('http://www2.alc.co.jp/ejr/index.php?word_in='+q+'&word_in3=PVawEWi72JXCKoa0Je','',''));
</script>