Skip to content

Instantly share code, notes, and snippets.

/Get A Href Secret

Created Apr 3, 2010
Embed
What would you like to do?
jetpack.future.import("clipboard");
jetpack.statusBar.append(
{
html: "Get A Href",
onReady: function(widget){
$(widget).click( function(){
var doc = jetpack.tabs.focused.contentDocument;
var s = "<a href=\"" + doc.URL + "\">" + doc.title + "</a>";
jetpack.clipboard.set(s);
jetpack.notifications.show(s);
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment