mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #4748 from minigt/bugfix/fix-browser-regex-to-allow-moto-edge-to-cast
Change regex for browser detection
This commit is contained in:
commit
49ccabf5af
1 changed files with 7 additions and 10 deletions
|
@ -148,14 +148,11 @@ let _supportsCssAnimation;
|
||||||
let _supportsCssAnimationWithPrefix;
|
let _supportsCssAnimationWithPrefix;
|
||||||
function supportsCssAnimation(allowPrefix) {
|
function supportsCssAnimation(allowPrefix) {
|
||||||
// TODO: Assess if this is still needed, as all of our targets should natively support CSS animations.
|
// TODO: Assess if this is still needed, as all of our targets should natively support CSS animations.
|
||||||
if (allowPrefix) {
|
if (allowPrefix && (_supportsCssAnimationWithPrefix === true || _supportsCssAnimationWithPrefix === false)) {
|
||||||
if (_supportsCssAnimationWithPrefix === true || _supportsCssAnimationWithPrefix === false) {
|
return _supportsCssAnimationWithPrefix;
|
||||||
return _supportsCssAnimationWithPrefix;
|
}
|
||||||
}
|
if (_supportsCssAnimation === true || _supportsCssAnimation === false) {
|
||||||
} else {
|
return _supportsCssAnimation;
|
||||||
if (_supportsCssAnimation === true || _supportsCssAnimation === false) {
|
|
||||||
return _supportsCssAnimation;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let animation = false;
|
let animation = false;
|
||||||
|
@ -187,13 +184,13 @@ function supportsCssAnimation(allowPrefix) {
|
||||||
const uaMatch = function (ua) {
|
const uaMatch = function (ua) {
|
||||||
ua = ua.toLowerCase();
|
ua = ua.toLowerCase();
|
||||||
|
|
||||||
const match = /(edg)[ /]([\w.]+)/.exec(ua)
|
const match = /(chrome)[ /]([\w.]+)/.exec(ua)
|
||||||
|
|| /(edg)[ /]([\w.]+)/.exec(ua)
|
||||||
|| /(edga)[ /]([\w.]+)/.exec(ua)
|
|| /(edga)[ /]([\w.]+)/.exec(ua)
|
||||||
|| /(edgios)[ /]([\w.]+)/.exec(ua)
|
|| /(edgios)[ /]([\w.]+)/.exec(ua)
|
||||||
|| /(edge)[ /]([\w.]+)/.exec(ua)
|
|| /(edge)[ /]([\w.]+)/.exec(ua)
|
||||||
|| /(opera)[ /]([\w.]+)/.exec(ua)
|
|| /(opera)[ /]([\w.]+)/.exec(ua)
|
||||||
|| /(opr)[ /]([\w.]+)/.exec(ua)
|
|| /(opr)[ /]([\w.]+)/.exec(ua)
|
||||||
|| /(chrome)[ /]([\w.]+)/.exec(ua)
|
|
||||||
|| /(safari)[ /]([\w.]+)/.exec(ua)
|
|| /(safari)[ /]([\w.]+)/.exec(ua)
|
||||||
|| /(firefox)[ /]([\w.]+)/.exec(ua)
|
|| /(firefox)[ /]([\w.]+)/.exec(ua)
|
||||||
|| ua.indexOf('compatible') < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)
|
|| ua.indexOf('compatible') < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue