Why not make your app fullscreen instead?
You'd have to account for different implementations (webkit vs. gecko prefixes, method naming differs from the W3C standards, etc.), but that seems like the way to go in your case.
Instead of hideAddressBar()
, have a goFullScreen()
, ruffly doing this:
function goFullScreen() {
var docElm = $doc.documentElement;
if (docElm.requestFullscreen) {
docElm.requestFullscreen();
} else if (docElm.mozRequestFullScreen) {
docElm.mozRequestFullScreen();
} else if (docElm.webkitRequestFullScreen) {
docElm.webkitRequestFullScreen();
}
}
See Using Fullscreen Mode on MDN, and also Using the fullscreen API in web browsers on hacks.mozilla.org.
Also check out this useful gist from robnyman for a quick get-go.