change alert messages to chat messages for spelling cheker
authorLaurent Mazet <mazet@softndesign.org>
Wed, 10 Jun 2020 05:43:45 +0000 (07:43 +0200)
committerLaurent Mazet <mazet@softndesign.org>
Wed, 10 Jun 2020 05:43:45 +0000 (07:43 +0200)
public/trivabble.js

index e2405c3f57c503e9e3c99b964e34fbb6e00d1638..c614ab197d44a656d8ea763f4703d5eb408eb330 100644 (file)
 
         /* Advice on erroneous spelling */
         if (badWords.length > 0) {
-            myAlert(format(_("Incorrect speeling for {0} from {1}"), badWords, words));
+            const msg = chatMessage("", format(_("Incorrect speeling for {0} from {1}"), badWords, words));
+            msg.classList.add("error");
         } else if (words.length > 0) {
-            myAlert(format(_("All words are correct: {0}"), words));
+            chatMessage("", format(_("All words are correct: {0}"), words));
         } else {
             myAlert(_("No new word found"));
         }