Skip to content

Instantly share code, notes, and snippets.

@hongrich
Created May 24, 2011 17:30
Show Gist options
  • Save hongrich/989202 to your computer and use it in GitHub Desktop.
Save hongrich/989202 to your computer and use it in GitHub Desktop.
iOS launch app from safari or download app from store (from Square)
a.launchOrInstallWallet = function () {
var b = new Date().getTime();
setTimeout(function () {
if (new Date().getTime() - b < 200) {
document.location = "itms://itunes.apple.com/us/app/square/id335393788"
}
}, 150);
document.location = "square-unbox://"
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment