From: Laurent Mazet Date: Sun, 31 May 2020 23:15:30 +0000 (+0200) Subject: correct spelling :-( X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=a604b42deac95729734ff7fd5fa1b19828efe68b;p=trivabble.git correct spelling :-( --- diff --git a/public/trivabble.js b/public/trivabble.js index fc8a816..de80464 100644 --- a/public/trivabble.js +++ b/public/trivabble.js @@ -59,7 +59,7 @@ let scoreOf; let bag; let boardLangSelect; - let dictionnary; + let dictionary; const playerLetters = []; let currentPlayer = ""; @@ -150,13 +150,13 @@ } } - function downloadDictionnary(code) { - if (typeof downloadDictionnary.code === "undefined") { - downloadDictionnary.code = ""; - } else if (downloadDictionnary.code === code) { + function downloadDictionary(code) { + if (typeof downloadDictionary.code === "undefined") { + downloadDictionary.code = ""; + } else if (downloadDictionary.code === code) { return; } - downloadDictionnary.code = code; + downloadDictionary.code = code; const file = new XMLHttpRequest(); file.overrideMimeType("application/json"); @@ -164,7 +164,7 @@ file.onreadystatechange = function () { if ((file.readyState === 4) && (file.status == "200")) { try { - dictionnary = JSON.parse(file.responseText); + dictionary = JSON.parse(file.responseText); document.getElementById("check-spelling").disabled = false; } catch (e) { console.error(e); @@ -581,7 +581,7 @@ localStorage.trivabbleBoardLang = value; document.getElementById("board-lang").value = value; document.getElementById("check-spelling").disabled = true; - downloadDictionnary(value); + downloadDictionary(value); break; } } @@ -1547,10 +1547,10 @@ let words = searchNewWords(); - /* Check if words are in dictionnary */ + /* Check if words are in dictionary */ let badWords = words.slice(); for (const k of Object.keys(badWords)) { - if (dictionnary.includes(badWords[k])) { + if (dictionary.includes(badWords[k])) { delete badWords[k]; } }