Skip to content

Instantly share code, notes, and snippets.

@matthewfl
Created January 2, 2009 20:33
Show Gist options
  • Select an option

  • Save matthewfl/42676 to your computer and use it in GitHub Desktop.

Select an option

Save matthewfl/42676 to your computer and use it in GitHub Desktop.
Get Quote to add to any page from quote.appjet.net
// Quotes from: http://quote.appjet.net
// Ubiquity code from http://ubiquity.appjet.net/
// BY: quote
// Title: quote
/* Description: Add quote to anything from http://quote.appjet.net */
var quote = "Made by Mattewfl.com";
function get_quote (b) {
b = b || function () {};
jQuery.get("http://quote.appjet.net/ubiquity", function (d) {
quote = d;
b(d);
});
}
get_quote();
CmdUtils.CreateCommand({
name: "quote",
preview: function ( p ) {
p.innerHTML = '<a href=\"http:\/\/quote.appjet.net\/\">'+quote+"<br><br>From http://quote.appjet.net/<\/a>";
},
execute: function() {
CmdUtils.setSelection(quote+"\n");
get_quote();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment