-
-
Save eriwen/96853 to your computer and use it in GitHub Desktop.
DZone command for Mozilla Ubiquity
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({ | |
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