Created
May 29, 2012 11:09
-
-
Save superfeedr/2827860 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
<button onclick="share();">Share</button> | |
<script> | |
function share() { | |
var intent = new WebKitIntent("http://webintents.org/share", "text/uri-list", this.urlToShare); | |
var onSuccess = function(data) { | |
// Successful sharing | |
}; | |
var onError = function(data) { | |
// User canceled sharing | |
}; | |
window.navigator.webkitStartActivity(intent, onSuccess, onError); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment