Full screeen mode in Adroid navigator

Set the full screen mode and hide the url bar in Android navigator.

function hideAddressBar(){
   if(document.documentElement.scrollHeight<window.outerHeight/window.devicePixelRatio)
      document.documentElement.style.height=(window.outerHeight/window.devicePixelRatio)+'px'
      setTimeout(window.scrollTo(1,1),0);
      }
   window.addEventListener("load",function(){hideAddressBar();});
   window.addEventListener("orientationchange",function(){hideAddressBar();});
Tagged with:
Posted in Programación