Skip to content

Instantly share code, notes, and snippets.

@aaustin
Created October 23, 2015 05:24
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 aaustin/f0eb2a6fc905a791ea0c to your computer and use it in GitHub Desktop.
Save aaustin/f0eb2a6fc905a791ea0c to your computer and use it in GitHub Desktop.
var fallbackFunction = function() {
window.location.replace('market://details?id=com.myapp.package');
};
var addIFrame = function() {
var iframe = document.createElement("iframe");
iframe.style.border = "none";
iframe.style.width = "1px";
iframe.style.height = "1px";
iframe.src = 'your_uri_scheme://';
document.body.appendChild(iframe);
};
addIFrame();
setTimeout(fallbackFunction, 250);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment