diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index 59985afe8..66f179591 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -730,8 +730,14 @@ } } + var userAgent = navigator.userAgent.toLowerCase(), + check = function(regex){ return regex.test(userAgent); }, + isIE = !check(/opera/) && (check(/msie/) || check(/trident/) || check(/edge/)), + isChrome = !isIE && check(/\bchrome\b/), + isSafari_mobile = !isIE && !isChrome && check(/safari/) && (navigator.maxTouchPoints>0); + path += app + "/"; - path += config.type === "mobile" + path += (config.type === "mobile" || isSafari_mobile) ? "mobile" : config.type === "embedded" ? "embed"