1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

add initial support for Edge chromium

This commit is contained in:
nyanmisaka 2020-07-27 21:11:12 +08:00
parent 8d57403a06
commit 7e5be8e05e
7 changed files with 23 additions and 6 deletions

View file

@ -127,7 +127,10 @@ define([], function () {
var uaMatch = function (ua) {
ua = ua.toLowerCase();
var match = /(edge)[ \/]([\w.]+)/.exec(ua) ||
var 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) ||
@ -190,7 +193,9 @@ define([], function () {
browser[matched.platform] = true;
}
if (!browser.chrome && !browser.edge && !browser.opera && userAgent.toLowerCase().indexOf('webkit') !== -1) {
browser.edgeChromium = browser.edg || browser.edga || browser.edgios;
if (!browser.chrome && !browser.edgeChromium && !browser.edge && !browser.opera && userAgent.toLowerCase().indexOf('webkit') !== -1) {
browser.safari = true;
}