Last active
April 2, 2019 22:52
-
-
Save moroishi/2802669 to your computer and use it in GitHub Desktop.
選択されたテキストを英辞郎で検索するブックマークレット
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:var s = ''; if (window.navigator.appName == 'Microsoft Internet Explorer') {s = document.selection.createRange().text;} else {s = window.getSelection();} if (!s || s == '') {s = prompt('単語を入力してください。', '');} if (s) { window.open("http://eow.alc.co.jp/" + s); } void(0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 以下は整形したソース | |
var s = ''; | |
if (window.navigator.appName == 'Microsoft Internet Explorer') { | |
s = document.selection.createRange().text; | |
} else { | |
s = window.getSelection(); | |
} | |
if (!s || s == '') { | |
s = prompt('単語を入力してください。', ''); | |
} | |
if (s) { | |
window.open("http://eow.alc.co.jp/" + s); | |
} | |
void(0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment