From 0c2621f3a6b37769e679cdc23b217ae8863fcce7 Mon Sep 17 00:00:00 2001 From: Serraniel Date: Sat, 7 Nov 2020 17:23:29 +0100 Subject: [PATCH] #32 Added configuration class --- src/javascript/configuration/configuration.js | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/javascript/configuration/configuration.js diff --git a/src/javascript/configuration/configuration.js b/src/javascript/configuration/configuration.js new file mode 100644 index 0000000..7048301 --- /dev/null +++ b/src/javascript/configuration/configuration.js @@ -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; +} \ No newline at end of file