tweak ui/site initialization order

pull/7407/head
Thibault Duplessis 2020-10-02 18:55:59 +02:00
parent b66d4fc877
commit 63a694f74c
1 changed files with 5 additions and 4 deletions

View File

@ -28,14 +28,15 @@ lichess.load.then(() => {
moduleLaunchers();
requestAnimationFrame(() => {
miniBoard.initAll();
miniGame.initAll();
pubsub.on('content-loaded', miniBoard.initAll);
pubsub.on('content-loaded', miniGame.initAll);
timeago.updateRegularly(1000);
pubsub.on('content-loaded', timeago.findAndRender);
});
requestIdleCallback(() => {
const friendsEl = document.getElementById('friend_box');
if (friendsEl) new OnlineFriends(friendsEl);
@ -67,7 +68,7 @@ lichess.load.then(() => {
$('html').off('click', handler);
};
$('html').on('click', handler);
});
}, 200);
});
powertip.watchMouse();
@ -178,5 +179,5 @@ lichess.load.then(() => {
return false;
});
});
});
}, 800);
});