<p id="help-turn" data-l10n="text-content">Who's turn? Click on the Turn button!</p>
<button id="clear-rack" class="minibutton" data-l10n="text-content">Put back all the tiles of your rack in the bag</button>
<button id="show-rack" class="minibutton" data-l10n="text-content">Show my rack to other players</button>
- <button id="check-spelling" class="minibutton" data-l10n="text-content">Check spelling for new words</button>
+ <button id="check-spelling" class="minibutton" data-l10n="text-content" disabled="disabled">Check spelling for new words</button>
</div>
</body>
</html>
? format(_("You changed the language of the board to {0}"), newLang)
: format(_("{0} changed the language of the board to {1}"), msg.sender, newLang)
);
+ document.getElementById("check-spelling").disabled = true;
const code = document.getElementById("board-lang").value;
const file = new XMLHttpRequest();
file.overrideMimeType("application/json");
if ((file.readyState === 4) && (file.status == "200")) {
try {
dictionnary = JSON.parse(file.responseText);
+
+ document.getElementById("check-spelling").disabled = false;
} catch (e) {
console.error(e);
}
function searchWordInLine(row, col, incRow, incCol) {
+ const initLetter = getLetterFromBoard(row, col);
+
/* Look for first letter in line */
while (getLetterFromBoard(row - incRow, col - incCol) !== "") {
row -= incRow;
row += incRow;
col += incCol;
}
- return (word.length > 1) ? word : "";
+ return (word === initLetter) ? "" : word;
}
function searchNewWords() {