Skip to content

Commit

Permalink
Merge pull request #5612 from scampower3/regex-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
thornbill committed May 26, 2024
2 parents 61976b8 + c1db082 commit 788ce37
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/scripts/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,15 @@ function supportsCssAnimation(allowPrefix) {
const uaMatch = function (ua) {
ua = ua.toLowerCase();

const match = /(chrome)[ /]([\w.]+)/.exec(ua)
|| /(edg)[ /]([\w.]+)/.exec(ua)
ua = ua.replace(/(motorola edge)/, '').trim();

const match = /(edg)[ /]([\w.]+)/.exec(ua)
|| /(edga)[ /]([\w.]+)/.exec(ua)
|| /(edgios)[ /]([\w.]+)/.exec(ua)
|| /(edge)[ /]([\w.]+)/.exec(ua)
|| /(opera)[ /]([\w.]+)/.exec(ua)
|| /(opr)[ /]([\w.]+)/.exec(ua)
|| /(chrome)[ /]([\w.]+)/.exec(ua)
|| /(safari)[ /]([\w.]+)/.exec(ua)
|| /(firefox)[ /]([\w.]+)/.exec(ua)
|| ua.indexOf('compatible') < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)
Expand Down

0 comments on commit 788ce37

Please sign in to comment.