新增加的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 = "將目前網頁翻譯為中文";
- }
- });



您必須保留原作姓名標示
您不得為商業使用本著作
您不得改變或改作本著作
最新留言