Skip to content

Instantly share code, notes, and snippets.

@cfjedimaster
Created May 1, 2012 19:13
Show Gist options
  • Save cfjedimaster/2570618 to your computer and use it in GitHub Desktop.
Save cfjedimaster/2570618 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<script src="cordova-1.6.1.js"></script>
<script src="webintent.js"></script>
<script>
function init() {
document.addEventListener("deviceready",deviceReady,false);
}
function deviceReady() {
console.log("Device Ready");
window.plugins.webintent.getUri(function(url) {
if(url !== "") {
// url is the url the intent was launched with
document.querySelector("#test").innerHTML = "URL was "+url;
}
});
}
</script>
</head>
<body onload="init()">
<h1>Test</h1>
<div id="test"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment