感謝㊣贊助鼓勵!

Google搜尋 »

分類

簡睿在噗浪»

有朋自遠方來

新增加的FireFox Ubiquity指令:books、k+與en2zh

又增加幾個Ubiquity指令,能處理下列功能:

  • 博客來關鍵字搜尋,如:books 德川家康
  • Yahoo!知識+搜尋,如:k+ Twitter
  • 將目前網頁翻譯為中文,使用Google的翻譯功能將英文網頁翻譯為繁體中文,如:en2zh

 

下載資訊:

增加的程式碼:

  1. CmdUtils.CreateCommand({
  2. name: "books",
  3. author: { name: "emisjerry"},
  4. contributors: ["emisjerry"],
  5. license: "GPL",
  6. description: "博客來關鍵字搜尋",
  7. takes: {"要查詢的商品": noun_arb_text},
  8. icon: "http://www.books.com.tw/favicon.ico",
  9. execute: function(directObject) {
  10. Utils.openUrlInBrowser("http://search.books.com.tw/exep/prod_search.php?cat=all&key=" +
  11. encodeURIComponent(directObject.text));
  12. }
  13. });
  14.  
  15. CmdUtils.CreateCommand({
  16. name: "k+",
  17. author: { name: "emisjerry"},
  18. contributors: ["emisjerry"],
  19. license: "GPL",
  20. description: "Yahoo!知識+搜尋",
  21. takes: {"要搜尋的內容": noun_arb_text},
  22. icon: "http://www.books.com.tw/favicon.ico",
  23. execute: function(directObject) {
  24. Utils.openUrlInBrowser("http://tw.knowledge.yahoo.com/search/search_result?p=" +
  25. encodeURIComponent(directObject.text));
  26. }
  27. });
  28.  
  29. CmdUtils.CreateCommand({
  30. name: "en2zh",
  31. icon: "http://www.google.com/favicon.ico",
  32. description: "將目前網頁翻譯為中文",
  33. execute: function() {
  34. var word = context.focusedWindow.document.location;
  35. Utils.openUrlInBrowser( "http://translate.google.com/translate?sl=en&tl=zh-TW&hl=zh-TW&ie=UTF-8&u=" +
  36. escape(word) );
  37. },
  38. preview : function(obj){
  39. obj.innerHTML = "將目前網頁翻譯為中文";
  40. }
  41. });

相關文章

填寫回應

 

 

 

您可使用這些HTML標籤

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

隨機文章

  1. [Xuite] 搜尋文章功能恢復 
  2. 把文章的分類當做HEMiDEMi的標籤:Xuite自動書籤按鈕 V1.3 (2)
  3. 遇到捷運列車故障… 
  4. 推推王貼文已選用標籤的困擾 (3)
  5. [Xuite] 在Xuite中使用上傳的圖片 
  6. 變更MyBlogLog的onclick事件處理程式 (V1.3修改) (8)
  7. 和風部落格FC2有中文版了 
  8. 把FTP網站變成虛擬磁碟機的工具:NetDrive 
  9. 用cPanel Proxy穿透防火牆以操作網站cPanel後台 
  10. 參考:Netbeans as a J2EE teaching IDE 

歷史熱門文章

  1. Plurk CSS樣式自訂修改全攻略 (30,962 點擊/2009-07-04)
  2. 把HTC Touch HD操作介面換成Spb Mobile Shell,美觀又便利! (20,274 點擊/2009-02-18)
  3. 強化閱讀第2噗:變更噗浪回應的字體與背景顏色 (17,547 點擊/2009-06-07)
  4. 另一套適用手機的影片轉檔工具:WinAVI 3GP/MP4/PSP/iPod Video Converter (16,753 點擊/2009-04-18)
  5. 強化HTC Touch HD的工具軟體 (14,969 點擊/2009-02-25)
  6. 如何手動輸入Plurk的表情圖示? (13,959 點擊/2008-09-29)
  7. 增加Spb Mobile Shell 3.0生活化桌面頁數的小技巧 (13,743 點擊/2009-04-27)
  8. 簡單放大Plurk輸入區的方法[修訂] (13,049 點擊/2008-09-29)
  9. 將Plurk回應區變成固定寬度 (12,873 點擊/2009-07-11)
  10. 將噗浪的視窗高度變大,加上分隔線,以方便閱讀 (12,514 點擊/2009-06-06)