mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
try to detect browser running in private mode
This commit is contained in:
parent
6ee89acc1c
commit
17ee0b713a
@ -21,6 +21,17 @@ $.fn.checked = function (value) {
|
||||
}
|
||||
};
|
||||
|
||||
function IsStorageEnabled() {
|
||||
try {
|
||||
localStorage.setItem("__test", "data");
|
||||
} catch (err) {
|
||||
if ((err.name).toUpperCase() == 'QUOTA_EXCEEDED_ERR') {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!Array.prototype.filter) {
|
||||
Array.prototype.filter = function (fun /*, thisp*/) {
|
||||
"use strict";
|
||||
|
@ -1113,6 +1113,10 @@ $(function () {
|
||||
|
||||
alert("This browser does not support web sockets. For a better experience, try a newer browser such as Chrome (android, desktop), Firefox, IE10, Safari (iOS) or Opera.");
|
||||
}
|
||||
|
||||
if (!IsStorageEnabled()) {
|
||||
alert("This browser does not support local storage or is running in private mode. For a better experience, try a newer browser such as Chrome (android, desktop), Firefox, IE10, Safari (iOS) or Opera.");
|
||||
}
|
||||
});
|
||||
|
||||
Dashboard.jQueryMobileInit();
|
||||
|
Loading…
Reference in New Issue
Block a user