-
-
Save gialloporpora/34359 to your computer and use it in GitHub Desktop.
Cite text in a Web page in BBCode, HTML and plain-text
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({ | |
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: "[email protected]"}, | |
license: "MPL,GPL", | |
execute: function() { | |
var doc = CmdUtils.getDocument(); | |
var params = Utils.paramsToString({ | |
q: "submit", | |
url: doc.location, | |
title: doc.title, | |
body: doc.getSelection() | |
}); | |
story_url="http://foxiewire.com/" + params; | |
/* Utils.openUrlInBrowser(story_url); */ | |
CmdUtils.setSelection(params+"<br>"+doc.location); | |
}, | |
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