Last active
December 10, 2015 08:18
-
-
Save walterrenner/4406475 to your computer and use it in GitHub Desktop.
Hide URL-Bar in mobile Safari
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Hide URL-Bar in mobile Safari</title> | |
</head> | |
<body> | |
<div id="wrapper" style="font-size:3em;"> | |
foo:bar | |
<br><br><br><br><br><br><br><br><br><br> | |
<br><br><br><br><br><br><br><br><br><br> | |
<br><br><br><br><br><br><br><br><br><br> | |
</div> | |
<script type="text/javascript"> | |
window.onload = function() { | |
var iPhone = ( navigator.userAgent.match(/(iPhone|iPod)/i) ? true : false ); | |
if (iPhone) { | |
window.scrollTo(0, 1); | |
} | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment