Skip to content

Instantly share code, notes, and snippets.

@gialloporpora
Created December 12, 2008 01:13
Show Gist options
  • Save gialloporpora/34981 to your computer and use it in GitHub Desktop.
Save gialloporpora/34981 to your computer and use it in GitHub Desktop.
CmdUtils.CreateCommand({
name: "foxiewire",
icon: "http://foxiewire.com/favicon.ico",
homepage: "http://www.gialloporpora.netsons.org/ubiquity",
description: "If not yet submitted, submits the page to Foxiewire. Otherwise, it takes you to the story's Foxiewire page.",
author: { name: "Sandro Della Giustina", email: "sandrodll@yahoo.it"},
takes: noun_arb_text,
license: "MPL,GPL",
execute: function( input ){
var doc = CmdUtils.getDocument();
var params = Utils.paramsToString({
q: 'submit',
url: doc.location.href,
title: doc.title,
body: input.text
});
story_url='http://foxiewire.com/' + params;
Utils.openUrlInBrowser(story_url);
},
preview: function(pblock) {
var html= 'Submit or vote this page to Foxiewire. Checking if this page has already been submitted...';
pblock.innerHTML=CmdUtils.renderTemplate(html);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment