mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Use the _ide version of browserIsSafari
This commit is contained in:
parent
e3b2ec9977
commit
76697599ae
1 changed files with 1 additions and 10 deletions
|
@ -1,14 +1,5 @@
|
|||
define [], () ->
|
||||
|
||||
browserIsSafari = () ->
|
||||
userAgent = navigator.userAgent
|
||||
(
|
||||
userAgent.match(/.*Safari\/.*/) &&
|
||||
!userAgent.match(/.*Chrome\/.*/) &&
|
||||
!userAgent.match(/.*Chromium\/.*/)
|
||||
)
|
||||
|
||||
|
||||
class Parser
|
||||
constructor: (@doc) ->
|
||||
|
||||
|
@ -16,7 +7,7 @@ define [], () ->
|
|||
# Safari regex is super slow, freezes browser for minutes on end,
|
||||
# hacky solution: limit iterations
|
||||
limit = null
|
||||
if browserIsSafari()
|
||||
if window?._ide?.browserIsSafari
|
||||
limit = 100
|
||||
|
||||
commands = []
|
||||
|
|
Loading…
Reference in a new issue