Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
//----------------------------
//選択した部分を特定のkeyを押してウィキペディア、ウィクショナリーで新しいウィンドウで開くスクリプト。
//----------------------------
function getSelectIE(){
if(navigator.appName == "Microsoft Internet Explorer"){
if( (event.keyCode == 84) && (event.shiftKey == true) && (event.ctrlKey == true) ){
xx = document.selection.createRange();
window.open("http://ja.wiktionary.org/wiki/" + xx.text , "new" , "");
}
if( (event.keyCode == 80) && (event.shiftKey == true) && (event.ctrlKey == true) ){
xx = document.selection.createRange();
window.open("http://ja.wikipedia.org/wiki/" + xx.text , "new" , "");
}
}
}

function getSelectNN(e){
if(navigator.appName == "Netscape"){
if( (e.which == 84) && (e.shiftKey == true) && (e.ctrlKey == true) ){
xx = document.getSelection();
window.open("http://ja.wiktionary.org/wiki/" + xx , "new" , "");
}
if( (e.which == 80) && (e.shiftKey == true) && (e.ctrlKey == true) ){
xx = document.getSelection();
window.open("http://ja.wikipedia.org/wiki/" + xx , "new" , "");
}
}
}
if(navigator.appName == "Microsoft Internet Explorer"){
document.onkeydown = getSelectIE;
}
if(navigator.appName == "Netscape"){
document.onkeydown = getSelectNN;
}