|
|
@@ -336,11 +336,21 @@ $.popup = (value) ->
|
|
|
window.open value.href or value, '_blank'
|
|
|
return
|
|
|
|
|
|
+isMac = null
|
|
|
$.isMac = ->
|
|
|
- navigator.userAgent?.indexOf('Mac') >= 0
|
|
|
+ isMac ?= navigator.userAgent?.indexOf('Mac') >= 0
|
|
|
|
|
|
+isIE = null
|
|
|
$.isIE = ->
|
|
|
- navigator.userAgent?.indexOf('MSIE') >= 0 || navigator.userAgent?.indexOf('rv:11.0') >= 0
|
|
|
+ isIE ?= navigator.userAgent?.indexOf('MSIE') >= 0 || navigator.userAgent?.indexOf('rv:11.0') >= 0
|
|
|
+
|
|
|
+isAndroid = null
|
|
|
+$.isAndroid = ->
|
|
|
+ isAndroid ?= navigator.userAgent?.indexOf('Android') >= 0
|
|
|
+
|
|
|
+isIOS = null
|
|
|
+$.isIOS = ->
|
|
|
+ isIOS ?= navigator.userAgent?.indexOf('iPhone') >= 0 || navigator.userAgent?.indexOf('iPad') >= 0
|
|
|
|
|
|
HIGHLIGHT_DEFAULTS =
|
|
|
className: 'highlight'
|