Another simple Ubiquity command for the morning… This one, called ‘expandlinks’, finds all links on the current page and adds the link’s URL (as a hyperlink itself) next to each existing link label. This is particularly handy if you’re going to print an HTML page for later reference.
CmdUtils.CreateCommand({
name: "expandlinks",
homepage: "http://eriksmartt.com/blog/",
author: { name: "Erik Smartt"},
license: "MPL",
preview: "Expands all hyperlinks, showing link locations.",
execute: function() {
var doc = Application.activeWindow.activeTab.document;
jQuery(doc.body).find("a").each(function(i) {
jQuery(this).after(" <<a href='" + this.href + "'>" + this.href + "</a>>");
});
}
})
And yes, it will be much easier to subscribe to these commands once I gather them into a JS file for Ubiquity. For now, you can copy/paste into the command editor if you’re interested in trying it out.
Ubiquity GitHub Gist Install 1:54 am on December 4, 2008 Permalink |
Ubiquity GitHub Gist Install
http://gist.github.com/31878
Jan 5:00 am on January 24, 2009 Permalink |
I like your Ubiquity commands. Thanks for sharing.