mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Add a ide.browserIsSafari
boolean flag.
This commit is contained in:
parent
8d6003dcc5
commit
e3b2ec9977
1 changed files with 13 additions and 0 deletions
|
@ -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"])
|
||||
|
|
Loading…
Reference in a new issue