Created
October 29, 2008 13:34
-
-
Save kaichen/20692 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
name: "dict", | |
icon: "http://dict.cn/favicon.ico", | |
homepage: "http://dict.cn/", | |
author: { name: "Kai Chen", email: "[email protected]"}, | |
license: "GPL", | |
description: "Search word in dict.cn", | |
help: "dict word_wanted_to_search", | |
takes: {"input": noun_arb_text}, | |
preview: function( pblock, input ) { | |
pblock.innerHTML = "Search dict.cn: " + input.text; | |
}, | |
execute: function(input) { | |
var url = "http://dict.cn/{QUERY}" | |
var query = input.text + ".htm"; | |
var urlString = url.replace("{QUERY}", query); | |
Utils.openUrlInBrowser(urlString); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment