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
|
|
|
|
2020-02-16 22:11:36 +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();
|
|
|
|
});
|