Created
September 22, 2009 04:23
-
-
Save ba3r/190819 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* 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