mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Backport pull request #5612 from jellyfin-web/release-10.9.z
Fix user agent detection
Original-merge: 788ce37c43
Merged-by: thornbill <thornbill@users.noreply.github.com>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
parent
2da46ebc7a
commit
da80ba85ee
1 changed files with 4 additions and 2 deletions
|
@ -188,13 +188,15 @@ function supportsCssAnimation(allowPrefix) {
|
||||||
const uaMatch = function (ua) {
|
const uaMatch = function (ua) {
|
||||||
ua = ua.toLowerCase();
|
ua = ua.toLowerCase();
|
||||||
|
|
||||||
const match = /(chrome)[ /]([\w.]+)/.exec(ua)
|
ua = ua.replace(/(motorola edge)/, '').trim();
|
||||||
|| /(edg)[ /]([\w.]+)/.exec(ua)
|
|
||||||
|
const match = /(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