From 7068c856a42a9157b942c068305375549492970b Mon Sep 17 00:00:00 2001 From: Minwe Date: Sun, 28 Sep 2014 15:54:02 +0800 Subject: [PATCH] add `.am-standalone` class to `html` in iOS standalone mode --- js/core.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/core.js b/js/core.js index e915c03..d4f5447 100644 --- a/js/core.js +++ b/js/core.js @@ -397,6 +397,11 @@ define(function(require, exports, module) { UI.support.animation && $html.addClass('cssanimations'); + // iOS standalone mode + if (window.navigator.standalone) { + $html.addClass('am-standalone'); + } + $('.am-topbar-fixed-top').length && $body.addClass('am-with-topbar-fixed-top'); $('.am-topbar-fixed-bottom').length && $body.addClass('am-with-topbar-fixed-bottom'); -- GitLab