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