jellyfin-web/dashboard-ui/thirdparty/apiclient/network.js

26 lines
515 B
JavaScript
Raw Normal View History

2014-10-28 16:17:55 -07:00
(function (globalScope, navigator) {
function networkStatus() {
var self = this;
self.isNetworkAvailable = function () {
2014-10-28 16:17:55 -07:00
var online = navigator.onLine;
if (online == null) {
online = true;
}
return online;
};
self.isAnyLocalNetworkAvailable = function () {
return self.isNetworkAvailable();
};
2014-10-28 16:17:55 -07:00
}
globalScope.NetworkStatus = new networkStatus();
})(window, window.navigator);