tweak ui/site init order

pull/7407/head
Thibault Duplessis 2020-10-02 19:54:09 +02:00
parent 63a694f74c
commit 33e8fd872f
1 changed files with 3 additions and 3 deletions

View File

@ -41,6 +41,9 @@ lichess.load.then(() => {
const friendsEl = document.getElementById('friend_box');
if (friendsEl) new OnlineFriends(friendsEl);
const chatMembers = document.querySelector('.chat__members') as HTMLElement | null;
if (chatMembers) watchers(chatMembers);
$('#main-wrap')
.on('click', '.autoselect', function(this: HTMLInputElement) { this.select(); })
.on('click', 'button.copy', function(this: HTMLElement) {
@ -134,9 +137,6 @@ lichess.load.then(() => {
el.setAttribute('content', el.getAttribute('content') + ',maximum-scale=1.0');
}
const chatMembers = document.querySelector('.chat__members') as HTMLElement | null;
if (chatMembers) watchers(chatMembers);
if (location.hash === '#blind' && !$('body').hasClass('blind-mode'))
xhr.text('/toggle-blind-mode', {
method: 'post',