diff --git a/public/index.html b/public/index.html
index 951b84112..02b1ed16c 100644
--- a/public/index.html
+++ b/public/index.html
@@ -309,15 +309,6 @@
layout
diff --git a/public/js/commandline.js b/public/js/commandline.js
index 574aa048c..db9bfb6f0 100644
--- a/public/js/commandline.js
+++ b/public/js/commandline.js
@@ -71,16 +71,6 @@ let commands = {
toggleQuickEnd();
}
},
- {
- id: "toggleHighlightMode",
- display: "Toggle word highlight mode",
- exec: () => {
- hideCaret();
- highlightWord(currentWordIndex,currentInput,config.showError);
- restartTest();
- toggleHighlightMode();
- }
- },
{
id: "toggleFlipTestColors",
display: "Toggle flip test colors",
diff --git a/public/js/layouts.js b/public/js/layouts.js
index c41de53a4..608eddd0c 100644
--- a/public/js/layouts.js
+++ b/public/js/layouts.js
@@ -20,12 +20,5 @@ const layouts = {
"aA","rR","sS","tT","dD","hH","nN","eE","iI","oO","'\"",
"zZ","xX","cC","vV","bB","kK","mM",",<",".>","/?",
" "
- ],
- workman:[
- "`~","1!","2@","3#","4$","5%","6^","7&","8*","9(","0)","-_","=+",
- "qQ","dD","rR","wW","bB","jJ","fF","uU","pP",";:","[{","]}","\\|",
- "aA","sS","hH","tT","gG","yY","nN","eE","oO","iI","'\"",
- "zZ","xX","mM","cC","vV","kK","lL",",<",".>","/?",
- " "
]
}
\ No newline at end of file
diff --git a/public/js/script.js b/public/js/script.js
index c0b3f7a3f..834b0b164 100644
--- a/public/js/script.js
+++ b/public/js/script.js
@@ -298,39 +298,10 @@ function updateActiveElement() {
activeWordTop = $("#words .word.active").position().top;
}
-function highlightWord(wrdIndex, input, showError){
- $($('#words .word')[wrdIndex]).empty();
- let currentWord = wordsList[wrdIndex];
- let ret = "";
- for (let i = 0; i < currentWord.length; i++) {
- ret += '' + currentWord[i] + "";
- }
- $($('#words .word')[wrdIndex]).html(ret);
- if ((currentWord == input || (config.quickEnd && currentWord.length == input.length)) && wrdIndex == wordsList.length - 1) {
- inputHistory.push(input);
- currentInput = "";
- if(!resultVisible) showResult();
- }
-}
-
function compareInput(wrdIndex,input,showError) {
+ $($('#words .word')[wrdIndex]).empty();
let ret = "";
let currentWord = wordsList[wrdIndex];
- if (config.highlightMode){
- for (let i = 0; i < input.length; i++) {
- if (currentWord[i] != input[i]){
- if(config.difficulty == "master"){
- if(!resultVisible) showResult(true);
- restartCount++;
- }
- if (showError)
- highlightBadWord(wrdIndex, showError);
- }
- }
- return;
- }
- $($('#words .word')[wrdIndex]).empty();
-
for (let i = 0; i < input.length; i++) {
if (currentWord[i] == input[i]) {
ret += '' + currentWord[i] + "";
@@ -897,8 +868,7 @@ function restartTest(withSameWordset = false) {
}, 250);
wpmOverTimeChart.options.annotation.annotations[0].value = "-20";
wpmOverTimeChart.update();
- if (config.highlightMode)
- highlightWord(currentWordIndex, currentInput, config.showError);
+
// let oldHeight = $("#words").height();
// let newHeight = $("#words")
@@ -1309,8 +1279,7 @@ $("#wordsInput").keypress((event) => {
});
$("#wordsInput").on("focus", (event) => {
- if (!config.highlightMode)
- showCaret();
+ showCaret();
});
$("#wordsInput").on("focusout", (event) => {
@@ -1458,8 +1427,6 @@ $(document).keydown((event) => {
if (currentInput == "") return;
event.preventDefault();
let currentWord = wordsList[currentWordIndex];
- if (config.highlightMode)
- highlightWord(currentWordIndex+1, currentInput, config.showError);
if (config.mode == "time") {
let currentTop = $($("#words .word")[currentWordIndex]).position().top;
let nextTop = $($("#words .word")[currentWordIndex + 1]).position().top;
diff --git a/public/js/settings.js b/public/js/settings.js
index 74d56a530..29502ba63 100644
--- a/public/js/settings.js
+++ b/public/js/settings.js
@@ -25,10 +25,8 @@ function updateSettingsPage(){
setSettingsButton('blindMode', config.blindMode);
setSettingsButton('quickEnd', config.quickEnd);
setSettingsButton('flipTestColors', config.flipTestColors);
- setSettingsButton('highlightMode', config.highlightMode);
setSettingsButton('discordDot', config.showDiscordDot);
-
setActiveThemeButton();
setActiveLanguageButton();
setActiveLayoutButton();
@@ -267,18 +265,6 @@ $(".pageSettings .section.quickEnd .buttons .button.off").click(e => {
setSettingsButton('quickEnd', config.quickEnd);
})
-$(".pageSettings .section.highlightMode .buttons .button.on").click(e => {
- setHighlightMode(true);
- showNotification('Quick end on', 1000);
- setSettingsButton('highlightMode', config.highlightMode);
-})
-$(".pageSettings .section.highlightMode .buttons .button.off").click(e => {
- setHighlightMode(false);
- showNotification('Quick end off', 1000);
- setSettingsButton('highlightMode', config.highlightMode);
-})
-
-
//flip test
$(".pageSettings .section.flipTestColors .buttons .button.on").click(e => {
setFlipTestColors(true);
diff --git a/public/js/userconfig.js b/public/js/userconfig.js
index 92a4aff61..bb0d5b4b4 100644
--- a/public/js/userconfig.js
+++ b/public/js/userconfig.js
@@ -19,7 +19,6 @@ let defaultConfig = {
caretStyle: "default",
flipTestColors: false,
layout:"default",
- highlightMode:false
showDiscordDot: true
}
@@ -56,7 +55,6 @@ function loadConfigFromCookie() {
setDifficulty(newConfig.difficulty,true);
setBlindMode(newConfig.blindMode,true);
setQuickEnd(newConfig.quickEnd,true);
- setHighlightMode(newConfig.highlightMode, true);
setFlipTestColors(newConfig.flipTestColors,true);
setDiscordDot(newConfig.hideDiscordDot,true);
if(newConfig.resultFilters == null || newConfig.resultFilters == undefined){
@@ -64,22 +62,6 @@ function loadConfigFromCookie() {
}
config = newConfig;
}
- if(config.difficulty == undefined){
- config.difficulty = "normal";
- saveConfigToCookie();
- }
- if(config.blindMode == undefined){
- config.blindMode = false;
- saveConfigToCookie();
- }
- if(config.layout == undefined){
- config.layout = "default";
- saveConfigToCookie();
- }
- if (config.highlightMode == undefined){
- config.highlightMode = false;
- saveConfigToCookie();
- }
Object.keys(defaultConfig).forEach(configKey => {
if(config[configKey] == undefined){
config[configKey] = defaultConfig[configKey];
@@ -170,23 +152,6 @@ function setQuickEnd(qe, nosave){
if(!nosave) saveConfigToCookie();
}
-function toggleHighlightMode(){
- hm = !config.highlightMode;
- if(hm == undefined){
- hm = false;
- }
- config.highlightMode = hm;
- saveConfigToCookie();
-}
-
-function setHighlightMode(hm, nosave){
- if(hm == undefined){
- hm = false;
- }
- config.highlightMode = hm;
- saveConfigToCookie();
-}
-
//flip colors
function setFlipTestColors(flip,nosave){