-
-
Save Nemolog/19017 to your computer and use it in GitHub Desktop.
Twine Search (semantic web)
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({ | |
//nome del comando | |
name: "TwineSearch", | |
homepage: "http://bytezone.plumfake.net/", | |
author: { name: "Mauro Rubin", email: "mauro.rubin@plumfake.net"}, | |
help: "Se ne volete saperne di più andate su http://bytezone.plumfake.net/", | |
//definisco il tipo di parametro passato (in questo caso "noun_arb_text": testo semplice) | |
takes: {"qualcosa di interessante": noun_arb_text}, | |
//descrizione che apparirà sulla console | |
preview: function( pblock, ricerca ) { | |
//aggiorno la console in tempo reale | |
pblock.innerHTML = "Ricerca Semantica su twine: " + ricerca.text; | |
}, | |
//eseguo la ricerca | |
execute: function( ricerca ) { | |
var twineUrl = "http://www.twine.com/?interests=" + ricerca.text; | |
Utils.openUrlInBrowser(twineUrl ); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment