mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-19 23:07:42 +00:00
fix(web): Fixes #2379. Allows '.' in macOS version strings
This commit is contained in:
parent
775fd4db45
commit
acf138c8fb
1 changed files with 4 additions and 1 deletions
|
|
@ -74,7 +74,10 @@ namespace com.keyman {
|
|||
// Starting with 13.1, "Macintosh" can reflect iPads (by default) or iPhones
|
||||
// (by user setting); a new "Request Desktop Website" setting for Safari will
|
||||
// change the user agent string to match a desktop Mac.
|
||||
let regex = /Intel Mac OS X (10(?:_\d+)+)/i;
|
||||
//
|
||||
// Firefox uses '.' between version components, while Chrome and Safari use
|
||||
// '_' instead. So, we have to check for both. Yay.
|
||||
let regex = /Intel Mac OS X (10(?:[_\.]\d+)+)/i;
|
||||
let results = regex.exec(agent);
|
||||
|
||||
// Match result: a version string with components separated by underscores.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue