From f1d96ebcea523fff861a51ee35aa6a9cd3d96e64 Mon Sep 17 00:00:00 2001 From: Serraniel Date: Sat, 7 Nov 2020 17:32:18 +0100 Subject: [PATCH] #32 Added reload method in the configuration class --- src/javascript/configuration/configuration.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/javascript/configuration/configuration.js b/src/javascript/configuration/configuration.js index 7048301..1a02c28 100644 --- a/src/javascript/configuration/configuration.js +++ b/src/javascript/configuration/configuration.js @@ -1,3 +1,4 @@ +import { getGlobalStorageProvider } from "../browserApi/storageProvider"; import { assigned } from "../utils/helpers"; class Configuration { @@ -24,7 +25,25 @@ class Configuration { } reloadConfiguration() { + // website + getGlobalStorageProvider().getData('websiteDisplayQuickSearch', this.websiteDisplayQuickSearch, value => this.websiteDisplayQuickSearch = value); + getGlobalStorageProvider().getData('websiteShowNotificationsCountInTab', this.websiteShowNotificationsCountInTab, value => this.websiteShowNotificationsCountInTab = value); + getGlobalStorageProvider().getData('websiteHideUnusedTabs', this.websiteHideUnusedTabs, value => this.websiteHideUnusedTabs = value); + getGlobalStorageProvider().getData('websiteOptimizeListAppearance', this.websiteOptimizeListAppearance, value => this.websiteOptimizeListAppearance = value); + // anime + getGlobalStorageProvider().getData('animeLanguageDisplay', this.animeLanguageDisplay, value => this.animeLanguageDisplay = value); + + // requests + getGlobalStorageProvider().getData('requestBeautifyPage', this.requestBeautifyPage, value => this.requestBeautifyPage = value); + + // player + getGlobalStorageProvider().getData('playerAutoplayAfterScreenshot', this.playerAutoplayAfterScreenshot, value => this.playerAutoplayAfterScreenshot = value); + + // w2g + getGlobalStorageProvider().getData('w2gDisplayCharacterCounter', this.w2gDisplayCharacterCounter, value => this.w2gDisplayCharacterCounter = value); + + console.log(this); } }