uupaa.webintent.js

0.0.2 • Public • Published

WebIntent.js Build Status

npm

WebIntent implement.

Browser and NW.js(node-webkit)

<script src="<module-dir>/lib/WebModule.js"></script>
<script src="<module-dir>/lib/WebIntent.js"></script>
<script>
if (0) {
    // # Open the Google Play store.
    var packageName = "com.android.vending";           // Google Play
    var url         = "https://play.google.com/store"; // Google Play
    var intentURL   = WebIntent.build(packageName, url);

    WebIntent.redirect( intentURL );
}

if (0) {
    // # Open the page of Caniuse.com in Chrome for Android.
    var packageName = "com.android.chrome";               // Chrome for Android package name
    var url         = "http://caniuse.com/#search=webgl"; // Caniuse.com
    var intentURL   = WebIntent.build(packageName, url);

    WebIntent.redirect( intentURL );
}
</script>

Package Sidebar

Install

npm i uupaa.webintent.js

Weekly Downloads

1

Version

0.0.2

License

MIT

Last publish

Collaborators

  • uupaa