Reputation: 21
How to check that a web page is running in safari mode with address bar or in app mode without address bar in iPad
<script>
if (window.navigator.standalone) {
<link type="text/css" href="ipad.css" rel="stylesheet" />
}
els{
<link type="text/css" href="safari.css" rel="stylesheet" />
}
</script>
Upvotes: 2
Views: 1833
Reputation: 583
By in app mode I assume you mean when it's launched from the home screen:
if (window.navigator.standalone) {
/* Launched from home screen code */
}
This works on all iOS devices ASAIK.
Upvotes: 3