1
0
Fork 0
mirror of https://github.com/Alamantus/Lexiconga.git synced 2025-04-18 01:20:23 +02:00
Lexiconga/src/index.js

27 lines
648 B
JavaScript
Raw Normal View History

2019-05-02 15:45:10 -06:00
import setupListeners from './js/setupListeners';
import { renderAll } from './js/render';
import { hasToken } from './js/utilities';
import { loadDictionary } from './js/dictionaryManagement';
import { loadSettings } from './js/settings';
import { setupAds } from './js/ads';
2019-05-02 15:45:10 -06:00
2019-05-02 10:57:56 -06:00
function initialize() {
loadDictionary();
loadSettings();
setupListeners();
if (hasToken()) {
import('./js/account/index.js').then(account => {
account.loginWithToken();
});
}
setupAds().then(() => renderAll());
2019-05-02 10:57:56 -06:00
}
window.onload = (function (oldLoad) {
return function () {
oldLoad && oldLoad();
initialize();
}
})(window.onload);