two google related bookmarklets

two useful bookmarklet:

  1. google search bookmarklet||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));if(q!=null){window.open('http://www.google.com/search?q=' +q);void(0);} "google search")
  2. Chinese (Simplified)||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));var e=(document.charset||document.characterSet);if(t!=''){window.open('http://translate.google.com/?text='+t+'&hl=zh-CN&langpair=auto|zh-CN&tbb=1&ie='+e);}else{window.open('http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&hl=zh-CN&langpair=auto|zh-CN&tbb=1&ie='+e);};)

what is Bookmarklet?

Bookmarklet – Wikipedia, the free encyclopedia

How about google translate?

Google Translate