翻訳(エキサイト)
by
STAR_ZERO
2010-06-02 [2010/06/02 14:48:03]
選択されている文字列をエキサイトで翻訳(英→日)します。
@@ -1,10 +1,11 @@
/*
* @title 翻訳(エキサイト)
- * @description 選択されている文字列をエキサイトで翻訳(英→日)します。frame等は未対応
+ * @description 選択されている文字列をエキサイトで翻訳(英→日)します。※修正中 frame等は未対応
* @include http://*
* @license MIT License
* @require
*/
(function() {
- window.open('http://www.excite.co.jp/world/english/?before=' + window.getSelection());
+ var t = (window.getSelection)?window.getSelection().toString():window.document.selection.createRange().text;
+ window.open('http://www.excite.co.jp/world/english/?before=' + t);
})()
/*
* @title 翻訳(エキサイト)
* @description 選択されている文字列をエキサイトで翻訳(英→日)します。※修正中 frame等は未対応
* @include http://*
* @license MIT License
* @require
*/
(function() {
var t = (window.getSelection)?window.getSelection().toString():window.document.selection.createRange().text;
window.open('http://www.excite.co.jp/world/english/?before=' + t);
})()
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。