Created
June 15, 2010 02:56
-
-
Save julsdelatierra/438637 to your computer and use it in GitHub Desktop.
Ubiquity command to browse on Mozilla México website
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({ | |
names: ["mozmx"], | |
icon: "http://www.mozilla-mexico.org/favicon.ico", | |
description: "Comando para navegar en el sitio de mozilla México", | |
help: "Escribe mozmx y alguna de las opciones: wiki,forums,groups,chat,blog", | |
author: {name: "Julian Ceballos", email: "julianceballos@mozilla-mexico.org"}, | |
license: "GPL", | |
homepage: "http://www.mozilla-mexico.org", | |
arguments: [{role: 'object', nountype: noun_arb_text}], | |
preview: function preview(pblock, args) { | |
var mensaje = "<p>Quieres ir a <b>${seccion}</b>.</p><p><b>¿Cómo usar?</b></p><p>Escribe alguna de las siguientes opciones:</p><p>forums</p><p>chat</p><p>blog</p><p>groups</p><p>wiki</p>" | |
pblock.innerHTML = _(mensaje,{'seccion':args.object.text}); | |
}, | |
execute: function execute(args) { | |
switch(args.object.text){ | |
case "wiki": | |
displayMessage(_("Podras documentarte en nuestra wiki."), this); | |
Utils.openUrlInBrowser("http://www.mozilla-mexico.org/wiki"); | |
break; | |
case "forums": | |
displayMessage(_("Pide asistencia en los foros."), this); | |
Utils.openUrlInBrowser("http://www.mozilla-mexico.org/forums"); | |
break; | |
case "groups": | |
displayMessage(_("Unete a alguno de nuestros grupos."), this); | |
Utils.openUrlInBrowser("http://www.mozilla-mexico.org/groups"); | |
break; | |
case "blog": | |
displayMessage(_("Lee noticias del mundo mozilla en nuestro blog."), this); | |
Utils.openUrlInBrowser("http://www.mozilla-mexico.org/blog"); | |
break; | |
case "chat": | |
displayMessage(_("Charla con nosotros."), this); | |
Utils.openUrlInBrowser("http://www.mozilla-mexico.org/chat"); | |
break; | |
case "": | |
displayMessage(_("Bienvenido a la comunidad"), this); | |
Utils.openUrlInBrowser("http://www.mozilla-mexico.org"); | |
break; | |
default: | |
displayMessage(_("Lo sentimos no existe esta sección te enviaremos a la página principal"), this); | |
Utils.openUrlInBrowser("http://www.mozilla-mexico.org"); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment