drop ENABLE_SPELL_CHECKER
This commit is contained in:
parent
b23f70ea31
commit
ba4631e3dd
7
Makefile
7
Makefile
|
@ -10,7 +10,7 @@ endif
|
||||||
|
|
||||||
.PHONY: all help lang start-dev-server
|
.PHONY: all help lang start-dev-server
|
||||||
|
|
||||||
all: lang
|
all: lang emptydictlist
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@echo make extract-lang-dists: extract the distributions per language from Wikipedia
|
@echo make extract-lang-dists: extract the distributions per language from Wikipedia
|
||||||
|
@ -26,6 +26,11 @@ extract-lang-dists:
|
||||||
|
|
||||||
lang: public/l10n/js/fr.js
|
lang: public/l10n/js/fr.js
|
||||||
|
|
||||||
|
emptydictlist: public/dict/list.js
|
||||||
|
|
||||||
|
public/dict/list.js:
|
||||||
|
mkdir -p public/dict/ && touch public/dict/list.js
|
||||||
|
|
||||||
eslint:
|
eslint:
|
||||||
-${ESLINT} **/*.js
|
-${ESLINT} **/*.js
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,6 @@ window.TrivabbleConf = {
|
||||||
// To tweak only if your webserver is shared with other conflicting resources at / (e.g. Yunohost integration)
|
// To tweak only if your webserver is shared with other conflicting resources at / (e.g. Yunohost integration)
|
||||||
APP_PATH: "",
|
APP_PATH: "",
|
||||||
|
|
||||||
// Whether the spell checker is enabled (dictionaries must be downloaded on the server before enabling this option)
|
|
||||||
ENABLE_SPELL_CHECKER: false,
|
|
||||||
|
|
||||||
// The color of the flash light when double clicking on a cell
|
// The color of the flash light when double clicking on a cell
|
||||||
FLASH_LIGHT_COLOR: "#EE6633",
|
FLASH_LIGHT_COLOR: "#EE6633",
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,6 @@
|
||||||
setConf("APP_PATH", "");
|
setConf("APP_PATH", "");
|
||||||
setConf("ENABLE_MSG_SOUND", true);
|
setConf("ENABLE_MSG_SOUND", true);
|
||||||
setConf("ENABLE_TILE_SOUND", true);
|
setConf("ENABLE_TILE_SOUND", true);
|
||||||
setConf("ENABLE_SPELL_CHECKER", false);
|
|
||||||
setConf("DOUBLE_TAP_DURATIONS", [650, 1100, 1800, 3000, 5000]);
|
setConf("DOUBLE_TAP_DURATIONS", [650, 1100, 1800, 3000, 5000]);
|
||||||
setConf("DOUBLE_TAP_DURATION", middle("DOUBLE_TAP_DURATIONS"));
|
setConf("DOUBLE_TAP_DURATION", middle("DOUBLE_TAP_DURATIONS"));
|
||||||
setConf("FLASH_LIGHT_DURATIONS", [800, 1600, 3200]);
|
setConf("FLASH_LIGHT_DURATIONS", [800, 1600, 3200]);
|
||||||
|
@ -251,8 +250,10 @@
|
||||||
|
|
||||||
function checkDictionaryExistance() {
|
function checkDictionaryExistance() {
|
||||||
const code = document.getElementById("board-lang").value;
|
const code = document.getElementById("board-lang").value;
|
||||||
|
const availableLang = Object.prototype.hasOwnProperty.call(DictionaryList, code);
|
||||||
|
document.getElementById("disable-spell-checker-p").hidden = !availableLang;
|
||||||
|
|
||||||
if (Object.prototype.hasOwnProperty.call(DictionaryList, code) && getSetting("ENABLE_SPELL_CHECKER") && !document.getElementById("disable-spell-checker").checked) {
|
if (availableLang && !document.getElementById("disable-spell-checker").checked) {
|
||||||
document.getElementById("check-spelling").hidden = false;
|
document.getElementById("check-spelling").hidden = false;
|
||||||
document.getElementById("info-spell-checking").hidden = false;
|
document.getElementById("info-spell-checking").hidden = false;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1995,7 +1996,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleSpellChecker(e) {
|
function toggleSpellChecker(e) {
|
||||||
const disabled = !getSetting("ENABLE_SPELL_CHECKER") || document.getElementById("disable-spell-checker").checked;
|
const disabled = document.getElementById("disable-spell-checker").checked;
|
||||||
checkDictionaryExistance();
|
checkDictionaryExistance();
|
||||||
|
|
||||||
if (e) {
|
if (e) {
|
||||||
|
@ -2008,7 +2009,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function initSpellChecker() {
|
function initSpellChecker() {
|
||||||
document.getElementById("disable-spell-checker-p").hidden = !getSetting("ENABLE_SPELL_CHECKER");
|
|
||||||
document.getElementById("disable-spell-checker").checked = getSetting("DisableSpellChecker");
|
document.getElementById("disable-spell-checker").checked = getSetting("DisableSpellChecker");
|
||||||
toggleSpellChecker();
|
toggleSpellChecker();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue