線上英漢字典 Bookmarklet

| 3 Comments | No TrackBacks

之前分享使用FireFox書籤來即時翻譯網頁
而單字翻譯,Google toolbar仍有其不足,故寫了個小小Bookmarklet,線上英漢字典,將網頁文字圈選,即可利用http://cdict.net/來查詢此單字。
請將下列Bookmarklet置換那http://cdict.net/的Bookmark。

javascript:(function(){d=document;w=window;S=w.getSelection();U="http://cdict.net/"+S;if(S!=""){w.open(U,"%E7%B7%9A%E4%B8%8A%E8%8B%B1%E6%96%87%E5%AD%97%E5%85%B8","width=600,height=500,location,status,scrollbars,resizable,dependent=yes");}else{w.alert("%E8%AB%8B%E9%81%B8%E6%93%87%E6%96%87%E5%AD%97%EF%BC%81%EF%BC%81");}})()

參考來源:Bookmarklet 的小技巧

No TrackBacks

TrackBack URL: http://server.everfine.com.tw/blog/mt-tb.cgi/223

3 Comments

可不可以寫一個bookmarklet是抓n詞酷的例句?也是一個線上字典,在http://www.nciku.com.tw,拜託~

很簡單,只要改寫前面網址由http://cdict.net/ -> http://www.nciku.com.tw/search/all/,就可以了。

javascript:(function(){d=document;w=window;S=w.getSelection();U="http://www.nciku.com.tw/search/all/"+S;if(S!=""){w.open(U,"%E7%B7%9A%E4%B8%8A%E8%8B%B1%E6%96%87%E5%AD%97%E5%85%B8","width=600,height=500,location,status,scrollbars,resizable,dependent=yes");}else{w.alert("%E8%AB%8B%E9%81%B8%E6%93%87%E6%96%87%E5%AD%97%EF%BC%81%EF%BC%81");}})()

Google字典

javascript:(function(){d=document;w=window;S=w.getSelection();U=%22http://www.google.com.tw/dictionary?langpair=en|zh-TW&q=%22+S;if(S!=%22%22){w.open(U,%22%E7%B7%9A%E4%B8%8A%E8%8B%B1%E6%96%87%E5%AD%97%E5%85%B8%22,%22width=600,height=500,location,status,scrollbars,resizable,dependent=yes%22);}else{w.alert(%22%E8%AB%8B%E9%81%B8%E6%93%87%E6%96%87%E5%AD%97%EF%BC%81%EF%BC%81%22);}})()

March 2010

Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Archives

Powered by Movable Type 4.34-en

Recent Comments

  • philipz: Google字典 javascript:(function(){d=document;w=window;S=w.getSelection();U=%22http://www.google.com.tw/dictionary?langpair=en|zh-TW&q=%22+S;if(S!=%22%22){w.open(U,%22%E7%B7%9A%E4%B8%8A%E8%8B%B1%E6%96%87%E5%AD%97%E5%85%B8%22,%22width=600,height=500,location,status,scrollbars,resizable,dependent=yes%22);}else{w.alert(%22%E8%AB%8B%E9%81%B8%E6%93%87%E6%96%87%E5%AD%97%EF%BC%81%EF%BC%81%22);}})() read more
  • philipz: 很簡單,只要改寫前面網址由http://cdict.net/ -> http://www.nciku.com.tw/search/all/,就可以了。 javascript:(function(){d=document;w=window;S=w.getSelection();U="http://www.nciku.com.tw/search/all/"+S;if(S!=""){w.open(U,"%E7%B7%9A%E4%B8%8A%E8%8B%B1%E6%96%87%E5%AD%97%E5%85%B8","width=600,height=500,location,status,scrollbars,resizable,dependent=yes");}else{w.alert("%E8%AB%8B%E9%81%B8%E6%93%87%E6%96%87%E5%AD%97%EF%BC%81%EF%BC%81");}})() read more
  • dike: 可不可以寫一個bookmarklet是抓n詞酷的例句?也是一個線上字典,在http://www.nciku.com.tw,拜託~ read more

About this Entry

This page contains a single entry by philipz published on November 14, 2008 9:26 AM.

Ubuntu Disk management was the previous entry in this blog.

Spring Framework using RAD7 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.