update constants

pull/402/head
Alex Turchyn 2 months ago committed by Pete Matsyburka
parent c8fe36a2b6
commit 9537fe8c91

@ -3,10 +3,28 @@
module DetectBrowserDevice module DetectBrowserDevice
module_function module_function
# rubocop:disable Metrics/LineLength MOBILE_USER_AGENT_REGEXP = /
MOBILE_USER_AGENT_REGEXP = /iPhone|iPod|Android.*Mobile|Opera Mini|Opera Mobi|webOS|IEMobile|Windows Phone|BlackBerry|BB10|Mobile/i iPhone |
TABLET_USER_AGENT_REGEXP = /iPad|Android(?!.*Mobile)|Tablet|Kindle|PlayBook|Silk/i iPod |
# rubocop:enable Metrics/LineLength Android.*Mobile|
Opera\ Mini |
Opera\ Mobi |
webOS |
IEMobile |
Windows\ Phone |
BlackBerry |
BB10 |
Mobile
/ix
TABLET_USER_AGENT_REGEXP = /
iPad |
Android(?!.*Mobile)|
Tablet |
Kindle |
PlayBook |
Silk
/ix
def call(user_agent) def call(user_agent)
return :mobile if mobile?(user_agent) return :mobile if mobile?(user_agent)

Loading…
Cancel
Save