refactor: cleanup

This commit is contained in:
David Ralph
2021-09-28 23:04:04 +01:00
parent 883f025fbb
commit 80a7b6a56c
58 changed files with 295 additions and 212 deletions

View File

@@ -25,11 +25,11 @@ export function exportSettings() {
settings[key] = localStorage.getItem(key);
});
saveFile(settings, 'mue-settings.json');
window.stats.postEvent('tab', 'Settings exported');
variables.stats.postEvent('tab', 'Settings exported');
}
export function importSettings(e) {
const getMessage = (languagecode, text) => variables.language.getMessage(variables.languagecode, text);
const getMessage = (text) => variables.language.getMessage(variables.languagecode, text);
const content = JSON.parse(e.target.result);
Object.keys(content).forEach((key) => {
@@ -37,5 +37,5 @@ export function importSettings(e) {
});
toast(getMessage('toasts.imported'));
window.stats.postEvent('tab', 'Settings imported');
variables.stats.postEvent('tab', 'Settings imported');
}