Add a ide.browserIsSafari boolean flag.

This commit is contained in:
Shane Kilkelly 2016-04-11 14:35:59 +01:00
parent 8d6003dcc5
commit e3b2ec9977

View file

@ -112,4 +112,17 @@ define [
ide.localStorage = localStorage
ide.browserIsSafari = false
try
userAgent = navigator.userAgent
ide.browserIsSafari = (
userAgent &&
userAgent.match(/.*Safari\/.*/) &&
!userAgent.match(/.*Chrome\/.*/) &&
!userAgent.match(/.*Chromium\/.*/)
)
catch err
console.error err
angular.bootstrap(document.body, ["SharelatexApp"])