bestiejs / platform.js

A platform detection library.
https://mths.be/platform
MIT License
3.22k stars 408 forks source link

Headless Chorme is detected as Safari #132

Closed wereHamster closed 4 years ago

wereHamster commented 7 years ago

UA string: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/60.0.3107.4 Safari/537.36

Result of parse() is:

{
  description: 'Safari 7.x on Linux 64-bit',
  layout: 'WebKit',
  manufacturer: null,
  name: 'Safari',
  prerelease: null,
  product: null,
  ua: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/60.0.3107.4 Safari/537.36',
  version: '7.x',
  os: {
    architecture: 64,
    family: 'Linux',
    version: null,
  },
}

Tracked down because wdio-visual-regression-service uses this library to detect the browser name, and it ends up as Safari.

jdalton commented 7 years ago

Thank you @moduleType! Would you be open to creating a PR?

kevinpthorne commented 4 years ago

Are there plans to merge @chiefcll's fixes? It has been awhile...