Created
September 7, 2011 09:33
-
-
Save yoshimov/1200153 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
| CmdUtils.CreateCommand({ | |
| names: ["search with sparks", "sparks"], | |
| description: "Search news from Google Sparks.", | |
| help: "Select text and execute this command.", | |
| author: { | |
| name: "NOMURA Yoshihide", | |
| email: "nomura@pobox.com", | |
| homepage: "http://yoshimov.com/", | |
| }, | |
| license: "GPL", | |
| homepage: "http://yoshimov.com/", | |
| icon: "http://yoshimov.com/favicon.ico", | |
| arguments: [{role: "object", nountype: noun_arb_text, label: "text"}], | |
| execute: function execute(args) { | |
| var url = "https://plus.google.com/sparks/interests/" + args.object.text; | |
| Utils.openUrlInBrowser(url); | |
| }, | |
| preview: function preview(pblock, args) { | |
| pblock.innerHTML = "Search " + args.object.html.bold() + "."; | |
| }, | |
| }); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment