Open AlmirKadric opened 10 years ago
I found this to apply to safari on iPhone when you create a home screen icon. Data as follows:
Mozilla/5.0 (iPhone; CPU iPhone OS 6_1_3 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Mobile/10B329
useragent.is { chrome: false, firefox: false, ie: false, mobile_safari: false, mozilla: false, opera: false, safari: false, webkit: true, version: '536.26' }
useragent.parse { family: 'Mobile Safari', major: '6', minor: '3', patch: '0', source: 'Mozilla/5.0 (iPhone; CPU iPhone OS 6_1_3 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Mobile/10B329' }
It's not really a mobile safari
but a mobile chrome
. It might make more sense to introduce a mobile_chrome
property instead. Or a mobile
flag so you can check that instead.
yeah that makes sense, however the second example is a mobile safari user agent and should be treated as such.
Will see if I can find the time to PR a fix for this.
When using chrome from android device, even though 'mobile safari' is in the agent, it's not being parsed for useragent.is['mobile_safari'].
Also, this appears to work fine in useragent.parse as the family is Chrome Mobile. Some data below:
Mozilla/5.0 (Linux; Android 4.1.2; SC-06D Build/JZO54K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.92 Mobile Safari/537.36
useragent.is = { chrome: true, firefox: false, ie: false, mobile_safari: false, mozilla: false, opera: false, safari: false, webkit: true, version: '537.36' }
useragent.parse.family = family: Chrome Mobile