Tweak mobile version media query

pull/200/head
Thibaut 10 years ago
parent 8eb18ce4e3
commit 909ab5fa8e

@ -211,7 +211,8 @@
try try
# Need to sniff the user agent because some Android and Windows Phone devices don't take # Need to sniff the user agent because some Android and Windows Phone devices don't take
# resolution (dpi) into account when reporting device width/height. # resolution (dpi) into account when reporting device width/height.
@_isMobile ?= (window.matchMedia('(max-device-width: 767px), (max-device-height: 767px)').matches) or @_isMobile ?= (window.matchMedia('(max-device-width: 767px)').matches) or
(window.matchMedia('(max-device-height: 767px) and (max-device-width: 1024px)').matches) or
(navigator.userAgent.indexOf('Android') isnt -1 and navigator.userAgent.indexOf('Mobile') isnt -1) or (navigator.userAgent.indexOf('Android') isnt -1 and navigator.userAgent.indexOf('Mobile') isnt -1) or
(navigator.userAgent.indexOf('IEMobile') isnt -1) (navigator.userAgent.indexOf('IEMobile') isnt -1)
catch catch

Loading…
Cancel
Save