Skip to content

Instantly share code, notes, and snippets.

/Get A Href Secret

Created April 3, 2010 07:56
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 anonymous/8d482f748ddc6881e639 to your computer and use it in GitHub Desktop.
Save anonymous/8d482f748ddc6881e639 to your computer and use it in GitHub Desktop.
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