新增加的FireFox Ubiquity指令:books、k+與en2zh
又增加幾個Ubiquity指令,能處理下列功能:
- 博客來關鍵字搜尋,如:books 德川家康
- Yahoo!知識+搜尋,如:k+ Twitter
- 將目前網頁翻譯為中文,使用Google的翻譯功能將英文網頁翻譯為繁體中文,如:en2zh
下載資訊:
- 指令訂閱網址:ubq_jerry.html
- 下載完整指令原始碼:ubq_jerry.js
增加的程式碼:
- CmdUtils.CreateCommand({
- name: "books",
- author: { name: "emisjerry"},
- contributors: ["emisjerry"],
- license: "GPL",
- description: "博客來關鍵字搜尋",
- takes: {"要查詢的商品": noun_arb_text},
- icon: "http://www.books.com.tw/favicon.ico",
- execute: function(directObject) {
- Utils.openUrlInBrowser("http://search.books.com.tw/exep/prod_search.php?cat=all&key=" +
- encodeURIComponent(directObject.text));
- }
- });
- CmdUtils.CreateCommand({
- name: "k+",
- author: { name: "emisjerry"},
- contributors: ["emisjerry"],
- license: "GPL",
- description: "Yahoo!知識+搜尋",
- takes: {"要搜尋的內容": noun_arb_text},
- icon: "http://www.books.com.tw/favicon.ico",
- execute: function(directObject) {
- Utils.openUrlInBrowser("http://tw.knowledge.yahoo.com/search/search_result?p=" +
- encodeURIComponent(directObject.text));
- }
- });
- CmdUtils.CreateCommand({
- name: "en2zh",
- icon: "http://www.google.com/favicon.ico",
- description: "將目前網頁翻譯為中文",
- execute: function() {
- var word = context.focusedWindow.document.location;
- Utils.openUrlInBrowser( "http://translate.google.com/translate?sl=en&tl=zh-TW&hl=zh-TW&ie=UTF-8&u=" +
- escape(word) );
- },
- preview : function(obj){
- obj.innerHTML = "將目前網頁翻譯為中文";
- }
- });
您可能也會有興趣的類似文章
- 簡單的Mozilla Ubiquity應用:Yahoo!奇摩字典的查詢命令 (1則留言, 2008/08/30)
- 簡單的Mozilla Ubiquity應用2:將目前網頁貼上推推王的命令 (3則留言, 2008/08/31)
- 網路衝浪新幫手-無所不在的Firefox Ubiquity (10則留言, 2008/12/16)
- 用Ubiquity快速發佈 Plurk 訊息-改良版 (0則留言, 2008/09/27)
- 用Ubiquity快速發佈 Plurk 訊息 (4則留言, 2008/09/26)
- 用Ubiquity快速發佈Plurk訊息-用%l替換網址 (0則留言, 2008/10/07)
- 幾個好用的FireFox Ubiquity命令:shorten、goto和screengrab (0則留言, 2008/10/26)
- 重置Firefox Ubiquity的設定 (0則留言, 2009/04/12)
- Ubiquity在歲末又向前邁了一小步;0.1.3釋出 (4則留言, 2008/12/31)
- HighLight:程式碼顯示的美化工具 (0則留言, 2008/10/04)
- 超優的Free Icon Editor: IcoFX (5則留言, 2007/04/07)
- 事件處理程式與物件的順序對FireFox很重要 (0則留言, 2007/03/02)
- 神奇的FireFox記憶體減肥藥:FireFox Ultimate Optimizer (4則留言, 2008/01/12)
- 完全用鍵盤來操作FireFox的擴充:surfkeys+LoL (0則留言, 2008/09/07)
- 五指操控Firefox的「仿Vim」擴充套件: Vimperator/Pentadactyl (7則留言, 2010/11/18)
Sorry, 很久沒用Google sc…