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

28 lines
523 B
JavaScript
Raw Normal View History

2020-02-16 12:17:13 +09:00
define(['appStorage', 'events'], function (appStorage, events) {
'use strict';
2020-02-20 02:07:41 +09:00
var data;
function getConfig() {
if (data) {
return data;
}
2020-02-16 12:17:13 +09:00
fetch("/config.json").then(function (response) {
data = response.json();
})
2020-02-20 02:07:41 +09:00
return data;
}
function WebSettings() {
getConfig();
2020-02-16 12:17:13 +09:00
}
2020-02-19 22:39:22 +09:00
WebSettings.prototype.enableMultiServer = function () {
2020-02-20 02:07:41 +09:00
return getConfig().multiServer || false;
2020-02-16 12:17:13 +09:00
};
return new WebSettings();
});