Skip to content

Commit

Permalink
fixed input history display for master mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Miodec committed May 30, 2020
1 parent e02623b commit 8668ac5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions public/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,9 @@ function showResult(difficultyFailed = false) {

if(config.blindMode){
$.each($('#words .word'),(i,word)=>{
compareInput(i,inputHistory[i],true);
let input = inputHistory[i];
if(input == undefined) input = currentInput;
compareInput(i,input,true);
if(inputHistory[i] != wordsList[i]){
highlightBadWord(i,true);
}
Expand Down Expand Up @@ -1329,15 +1331,18 @@ if (firebase.app().options.projectId === "monkey-type-dev-67af4") {
$("#top .logo .bottom").text("monkey-dev");
$("head title").text("Monkey Dev")
}
1

if (window.location.hostname === "localhost") {
$("#top .logo .top").text("localhost");
$("head title").text($("head title").text() + " (localhost)");

}

$(document).on('mouseenter','#words .word',e =>{
if(resultVisible) $(e.currentTarget).append(`<div class="wordInputAfter">${$(e.currentTarget).attr('input')}</div>`);
if(resultVisible){
let input = $(e.currentTarget).attr('input');
if(input != undefined) $(e.currentTarget).append(`<div class="wordInputAfter">${input}</div>`);
}
})

$(document).on('mouseleave','#words .word',e =>{
Expand Down

0 comments on commit 8668ac5

Please sign in to comment.