Malcs (aka MrFrux): Difference between revisions
From Melvor Idle
m (Update for v1.1.2) |
No edit summary Tag: Reverted |
||
Line 10: | Line 10: | ||
[[File:Lemon69.jpg]] | [[File:Lemon69.jpg]] | ||
{{Menu}} | {{Menu}} | ||
<div id="ios-app-download"> | |||
<!-- This will be populated by JavaScript for eligible users --> | |||
</div> | |||
<script type="text/javascript"> | |||
// JavaScript code to check if the user is on a mobile device and not using the iOS app | |||
// If the conditions are met, populate the 'ios-app-download' div with a link to the iOS app. | |||
// Replace 'YOUR_IOS_APP_URL' with the actual URL of your iOS app on the App Store. | |||
var iOSAppURL = 'YOUR_IOS_APP_URL'; | |||
if (window.navigator.userAgent.match(/iPhone|iPad|iPod/i) && !window.navigator.userAgent.match(/Your iOS App User-Agent String/i)) { | |||
var downloadLink = '<a href="' + iOSAppURL + '">Download the iOS App</a>'; | |||
document.getElementById('ios-app-download').innerHTML = downloadLink; | |||
} | |||
</script> |