mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
26 lines
515 B
JavaScript
26 lines
515 B
JavaScript
(function (globalScope, navigator) {
|
|
|
|
function networkStatus() {
|
|
|
|
var self = this;
|
|
|
|
self.isNetworkAvailable = function () {
|
|
|
|
var online = navigator.onLine;
|
|
|
|
if (online == null) {
|
|
online = true;
|
|
}
|
|
|
|
return online;
|
|
};
|
|
|
|
self.isAnyLocalNetworkAvailable = function () {
|
|
|
|
return self.isNetworkAvailable();
|
|
};
|
|
}
|
|
|
|
globalScope.NetworkStatus = new networkStatus();
|
|
|
|
})(window, window.navigator); |