利用者:Shin-改/monobook.js

出典: フリー多機能辞典『ウィクショナリー日本語版(Wiktionary)』
ナビゲーションに移動 検索に移動

注意: 保存後、変更を確認するにはブラウザーのキャッシュを消去する必要がある場合があります。

  • Firefox / Safari: Shift を押しながら 再読み込み をクリックするか、Ctrl-F5 または Ctrl-R を押してください (Mac では ⌘-R)
  • Google Chrome: Ctrl-Shift-R を押してください (Mac では ⌘-Shift-R)
  • Internet Explorer / Microsoft Edge: Ctrl を押しながら 最新の情報に更新 をクリックするか、Ctrl-F5 を押してください
  • Opera: Ctrl-F5を押してください
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;
}