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

fix opera detection

This commit is contained in:
Luke Pulverenti 2015-12-23 13:04:17 -05:00
parent fe709e0670
commit c7796f7033

View file

@ -2373,9 +2373,10 @@ var AppInfo = {};
ua = ua.toLowerCase();
var match = /(edge)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(opr)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(safari)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];
@ -2396,6 +2397,10 @@ var AppInfo = {};
browser = "msie";
}
if (browser == 'opr') {
browser = 'opera';
}
return {
browser: browser,
version: match[2] || "0",