Skip to content

Instantly share code, notes, and snippets.

@eriwen
Created April 17, 2009 04:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eriwen/96853 to your computer and use it in GitHub Desktop.
Save eriwen/96853 to your computer and use it in GitHub Desktop.
DZone command for Mozilla Ubiquity
CmdUtils.CreateCommand({
name: "dzone",
homepage: "http://eriwen.com/downloads/dzone-ubiquity.js",
author: { name: "Eric Wendelin", email: "eric@eriwen.com" homepage: "http://eriwen.com/" },
license: "GPL",
description: "Submit the current page to DZone",
help: "Running this command will submit the current page to DZone",
takes: {},
preview: function() {
pblock.innerHTML = 'Submit this page to DZone';
},
execute: function() {
var doc = Application.activeWindow.activeTab.document;
var urlBase = "http://www.dzone.com/links/add.html";
var urlParam = "?url=" + doc.location;
var titleParam = "&title=" + doc.title;
Utils.openUrlInBrowser(urlBase + urlParam + titleParam);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment