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

@@ -1,7 +1,6 @@
import { render } from 'react-dom';
import App from './App';
import * as Constants from 'modules/constants';
import variables from 'modules/variables';
import './scss/index.scss';
@@ -32,20 +31,12 @@ import('./translations/' + variables.languagecode + '.json').then((language) =>
document.documentElement.lang = variables.languagecode.split('_')[0];
}
window.constants = Constants;
if (localStorage.getItem('stats') === 'true') {
window.stats = Stats;
} else {
window.stats = {
tabLoad: () => '',
postEvent: () => ''
};
variables.stats = Stats;
}
if (localStorage.getItem('keybindsEnabled') === 'true') {
window.keybinds = JSON.parse(localStorage.getItem('keybinds') || '{}');
} else {
window.keybinds = {};
variables.keybinds = JSON.parse(localStorage.getItem('keybinds') || '{}');
}
render(