assets/js/X-letter.js in word-games-theme-1.0.7 vs assets/js/X-letter.js in word-games-theme-1.0.8

- old
+ new

@@ -31,12 +31,13 @@ txtBox.value = serachValue if (ablank) { if (!serachValue.includes("?")) { - if (serachValue.length < letterLen) { + if (serachValue.length <= letterLen) { serachValue = serachValue + '?' + txtBox.value = serachValue } } } @@ -56,15 +57,16 @@ letterCloseButton.classList.add("ltr-cls-btn-commonPage") } let rangeOfBlankTile = script.dataset.range e.target.value = e.target.value.replace(/[^a-zA-Z? ]/g, '') if (rangeOfBlankTile === '') { - rangeOfBlankTile = 5 + rangeOfBlankTile = 3 } e.target.value = e.target.value.replace(/ /g, '?') let data = [] data = e.target.value.split('').filter((i) => i === '?') + // console.log(data) if (data.length > rangeOfBlankTile) { e.target.value = e.target.value.replace(/\?$/, '') } }) @@ -167,11 +169,11 @@ if (exculdeValue) { let data = [] filterData.map((item) => { let check = false for (let e = 0; e < exculdeValue.length; e++) { - const element = exculdeValue[e] + const element = exculdeValue[e].toLowerCase() if (item.includes(element)) { check = true break } else { check = false @@ -189,10 +191,10 @@ if (includeValue) { let data = [] filterData.map((item) => { let check = false for (let e = 0; e < includeValue.length; e++) { - const element = includeValue[e] + const element = includeValue[e].toLowerCase() if (!item.includes(element)) { check = true break } else { check = false