#32 Added reload method in the configuration class

This commit is contained in:
Serraniel 2020-11-07 17:32:18 +01:00
parent 0c2621f3a6
commit f1d96ebcea
Signed by: Serraniel
GPG key ID: 3690B4E7364525D3

View file

@ -1,3 +1,4 @@
import { getGlobalStorageProvider } from "../browserApi/storageProvider";
import { assigned } from "../utils/helpers"; import { assigned } from "../utils/helpers";
class Configuration { class Configuration {
@ -24,7 +25,25 @@ class Configuration {
} }
reloadConfiguration() { 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);
} }
} }