mirror of
https://github.com/mue/mue.git
synced 2026-07-27 10:41:08 +02:00
refactor: cleanup
This commit is contained in:
13
src/index.js
13
src/index.js
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user