-
-
Save anonymous/8d482f748ddc6881e639 to your computer and use it in GitHub Desktop.
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
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