#32 Added configuration class

This commit is contained in:
Serraniel 2020-11-07 17:23:29 +01:00
parent 2c45c6ba88
commit 0c2621f3a6
Signed by: Serraniel
GPG key ID: 3690B4E7364525D3

View file

@ -0,0 +1,39 @@
import { assigned } from "../utils/helpers";
class Configuration {
constructor() {
// website
this.websiteDisplayQuickSearch = true;
this.websiteShowNotificationsCountInTab = true;
this.websiteHideUnusedTabs = true;
this.websiteOptimizeListAppearance = true;
// anime
this.animeLanguageDisplay = true;
// requests
this.requestBeautifyPage = true;
// player
this.playerAutoplayAfterScreenshot = true;
// w2g
this.w2gDisplayCharacterCounter = true;
this.reloadConfiguration();
}
reloadConfiguration() {
}
}
let __globalConfig = undefined;
export function getGlobalConfiguration() {
if (!assigned(__globalConfig)) {
__globalConfig = new Configuration();
}
return __globalConfig;
}