September 24,2008

Ubiquity command - findbook(更新)

上一版沒有對 uri 作 encoding,所以找中文時會出錯,現在補上,只要呼叫 Ubiquity 內建的 encodeURIComponent() 就行了...
CmdUtils.CreateCommand({
  name: "findbook",
  contributors: ["elleryq"],
  license: "MPL",
  description: "讓買書變成更簡單的決定!",
  takes: {"書名關鍵字": noun_arb_text},
  icon: "http://findbook.tw/favicon.ico",
  execute: function(directObject) {
    Utils.openUrlInBrowser( "http://findbook.tw/search?keyword_type=keyword&q=" + encodeURIComponent(directObject.text) );
  }
});


Posted by elleryq at 樂多Roodo! │14:47 │回應(0)引用(0)資訊相關Idea與筆記
樂多分類:網路/3C 共同主題:Firefox 工具:編輯本文
Ads by Roodo! 

引用URL

http://cgi.blog.roodo.com/trackback/7237339