开发者

How to run javascript if iPhone is not in full screen mode?

I'd like to run this script, but only when iPhone is not in full screen mode.

<script>
if (navigator.userAgent.indexOf('iPhone') != -1) {
    addEventListener("load", function() {
        setTimeout(hideURLbar, 0);
        开发者_如何学C}, false);
    }
function hideURLbar() {
window.scrollTo(0, 1);}
</script>

So how can I do that? (Could this help?)


var hidescreen = ("standalone" in window.navigator) && !window.navigator.standalone)

if (hidescreen  && navigator.userAgent.indexOf('iPhone') != -1) {
    addEventListener("load", function() {
    setTimeout(hideURLbar, 0);
    }, false);
}
function hideURLbar() {
    window.scrollTo(0, 1);
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜