Make inquiry note `user` dependent.

Note is conserved when closing and reoping an inquiry about the same user consecutively, but lost as soon as an inquiry about another user is made.
pull/9602/head
kraktus 2021-08-17 09:50:44 +02:00
parent 1050b89bbd
commit d5e0472f52
1 changed files with 4 additions and 0 deletions

View File

@ -1,5 +1,9 @@
$(function () {
const noteStore = lichess.storage.make('inquiry-note');
const usernameNoteStore = lichess.storage.make('inquiry-note-user');
const username = $('#inquiry .meat > .user-link').text().split(' ')[0];
if (username != usernameNoteStore.get()) noteStore.remove();
usernameNoteStore.set(username);
const noteTextArea = $('#inquiry .notes').find('textarea')[0];
$('#inquiry .notes').on('mouseenter', () => {