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

add basic web client configuration

This commit is contained in:
dkanada 2020-02-16 12:17:13 +09:00
parent be23d14f48
commit ea9e79f4d3
5 changed files with 47 additions and 579 deletions

View file

@ -0,0 +1,30 @@
define(['appStorage', 'events'], function (appStorage, events) {
'use strict';
function readConfig(path, callback) {
var file = new XMLHttpRequest();
file.overrideMimeType("application/json");
file.open("GET", path, true);
file.onreadystatechange = function() {
if (file.readyState === 4 && file.status == "200") {
callback(file.responseText);
}
}
file.send(null);
}
var data = {};
function WebSettings() {
readConfig("/config.json", function(text) {
data = JSON.parse(text);
});
}
WebSettings.prototype.getMultiserver = function () {
return data.multiserver !== false;
};
return new WebSettings();
});