Skip to content

Instantly share code, notes, and snippets.

@spirinvladimir
Last active August 29, 2015 14:17
Show Gist options
  • Save spirinvladimir/1c31a8233664d7071b04 to your computer and use it in GitHub Desktop.
Save spirinvladimir/1c31a8233664d7071b04 to your computer and use it in GitHub Desktop.
requirebin sketch
[
{
platform: 'Android',
url: 'https://play.google.com/store/apps/details?id=de.schildbach.oeffi'
},
{
platform: 'iPhone',
url: 'https://itunes.apple.com/app/id378458261'
}
].forEach(function (o) {
if ((new RegExp(o.platform, 'i')).test(navigator.userAgent)) {
document.body.innerHTML = ('App on ' + o.platform + ' market').link(o.url);
}
});
[{platform:"Android",url:"https://play.google.com/store/apps/details?id=de.schildbach.oeffi"},{platform:"iPhone",url:"https://itunes.apple.com/app/id378458261"}].forEach(function(o){if(new RegExp(o.platform,"i").test(navigator.userAgent)){document.body.innerHTML=("App on "+o.platform+" market").link(o.url)}});
{
"name": "requirebin-sketch",
"version": "1.0.0"
}
<!-- contents of this file will be placed inside the <body> -->
<h1>Check this code on mobile</h1>
<!-- contents of this file will be placed inside the <head> -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment