英→日翻訳ブックマークレット
とりあえず各種をメモ
Excite
公式ページにある→ブックマークレット - エキサイト 翻訳
好きなのを使えば良いが、デフォルトで原文を表示して欲しい場合は書き換える
元は下記のようになっている(英→日の場合)
javascript:( function(){ var%20b=((window.getSelection&&window.getSelection())|| (document.getSelection&&document.getSelection())|| (document.selection&&document.selection.createRange&&document.selection.createRange().text)); if (b!='') { location.href='http://www.excite.co.jp/world/english/?before='+encodeURIComponent(b)+'&wb_lp=ENJA&ie=UTF-8'; } else { location.href='http://www.excite.co.jp/world/english/web/?wb_url='+encodeURIComponent(location.href)+'&wb_lp=ENJA'; } })();
elseの中身の末尾に「&wb_dis=3」を付加してやると原文も併記される。*1
javascript:( function(){ var%20b=((window.getSelection&&window.getSelection())|| (document.getSelection&&document.getSelection())|| (document.selection&&document.selection.createRange&&document.selection.createRange().text)); if (b!='') { location.href='http://www.excite.co.jp/world/english/?before='+encodeURIComponent(b)+'&wb_lp=ENJA&ie=UTF-8'; } else { location.href='http://www.excite.co.jp/world/english/web/?wb_url='+encodeURIComponent(location.href)+'&wb_lp=ENJA&wb_dis=3'; } })();
公式ページから好きなのを
→ウェブサイト翻訳ツール
Yahoo
公式ページには見当たらないので適当に自作
javascript:location.href='http://honyaku.yahoofs.jp/url_result?eid=CR-EJ&both=T&url='+encodeURIComponent(location.href) // Yahooで英→日 javascript:location.href='http://honyaku.yahoofs.jp/url_result?eid=CR-EJ&both=F&url='+encodeURIComponent(location.href) // Yahooで英→日(訳文のみ)
詳しくはYahoo!翻訳のソースを参照。
*1:うまいことはてな記法をかいくぐってjavascriptへのリンクを作っておきたかったのだが諦めた