Skip to content

Instantly share code, notes, and snippets.

@ba3r
Created September 22, 2009 04:23
Show Gist options
  • Save ba3r/190819 to your computer and use it in GitHub Desktop.
Save ba3r/190819 to your computer and use it in GitHub Desktop.
/* v0.3 OpenClosed.de */
CmdUtils.CreateCommand({
names: ["openclosed", "oc"],
icon: "http://synapsos.kilu.de/ubiquity/openclosed/favicon.ico",
description: "Suche für Öffnungszeiten in Deutschland.",
help: "z.B. open kaufland berlin oder oc freiberg aldi 09599.",
author: {name: "Michael Baer", homepage: "http://twitter.com/synapsos"},
license: "GPL",
homepage: "http://www.openclosed.de/",
arguments: [{role: 'object', nountype: noun_arb_text, label: "Filiale"}],
preview: function preview(pblock, args) {
if (args.object.text.length == 0){
pblock.innerHTML = "Suche nach Öffnungszeiten für Filialen und Geschäfte in Deutschland";}
else {
pblock.innerHTML = "Suche nach Öffnungszeiten für <b>" + args.object.html + "</b>";}
},
execute: function execute(args) {
var input = args.object.text.replace(/\s+/g,"+");
Utils.openUrlInBrowser( "http://www.openclosed.de/show.php?inp=" + input );
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment