2019-05-02 10:57:56 -06:00
|
|
|
import './main.scss';
|
|
|
|
|
2019-05-02 15:45:10 -06:00
|
|
|
import { DEFAULT_DICTIONARY } from './constants';
|
|
|
|
import setupListeners from './js/setupListeners';
|
2019-05-03 10:34:11 -06:00
|
|
|
import { renderAll } from './js/render';
|
2019-05-03 12:29:53 -06:00
|
|
|
import { cloneObject } from './helpers';
|
2019-05-02 15:45:10 -06:00
|
|
|
|
2019-05-02 10:57:56 -06:00
|
|
|
function initialize() {
|
|
|
|
console.log('initializing');
|
2019-05-03 12:29:53 -06:00
|
|
|
window.currentDictionary = cloneObject(DEFAULT_DICTIONARY);
|
2019-05-02 15:45:10 -06:00
|
|
|
setupListeners();
|
2019-05-03 10:34:11 -06:00
|
|
|
renderAll();
|
2019-05-02 10:57:56 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
window.onload = (function (oldLoad) {
|
|
|
|
return function () {
|
|
|
|
oldLoad && oldLoad();
|
|
|
|
initialize();
|
|
|
|
}
|
|
|
|
})(window.onload);
|