mirror of
https://github.com/Alamantus/Lexiconga.git
synced 2025-03-26 05:11:32 +01:00
27 lines
No EOL
648 B
JavaScript
27 lines
No EOL
648 B
JavaScript
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';
|
|
|
|
function initialize() {
|
|
loadSettings();
|
|
loadDictionary();
|
|
setupListeners();
|
|
|
|
if (hasToken()) {
|
|
import('./js/account/index.js').then(account => {
|
|
account.loginWithToken();
|
|
});
|
|
}
|
|
|
|
setupAds().then(() => renderAll());
|
|
}
|
|
|
|
window.onload = (function (oldLoad) {
|
|
return function () {
|
|
oldLoad && oldLoad();
|
|
initialize();
|
|
}
|
|
})(window.onload); |