assets/js/wordfinder-home.js in word-games-theme-2.4.3 vs assets/js/wordfinder-home.js in word-games-theme-2.4.4

- old
+ new

@@ -1,23 +1,22 @@ let txtBox = document.querySelector('.txtBox') txtBox.focus() let letterCloseButton = document.querySelector('.letter-close-button') - let startsWith = document.getElementById("startsWith"); let mustInclude = document.getElementById("mustInclude"); let endsWith = document.getElementById("endsWith"); let exculdeWith = document.getElementById("exculdeWith"); let inculdeWith = document.getElementById("inculdeWith"); let wordLength = document.getElementById("wordLength"); // // when typing on input txtBox.addEventListener('input', (e) => { if (e.target.value === "") { - // letterCloseButton.style.display = "none" + letterCloseButton.style.display = "none" } else { - // letterCloseButton.style.display = "block" + letterCloseButton.style.display = "block" } e.target.value = e.target.value.replace(/[^a-zA-Z? ]/g, "") let rangeOfBlankTile = 3 if (rangeOfBlankTile === "") { rangeOfBlankTile = 3 @@ -110,11 +109,10 @@ } else if (type === "text/css") { document.head.appendChild(resourceEle); } }); }; - const formElement = document.querySelector("#form"); formElement.addEventListener("submit", function (e) { e.preventDefault(); document.querySelector(".fillterWrapper").classList.add("hide") @@ -194,12 +192,9 @@ .catch((error) => { console.error("Error loading resource:", error); }); } }); - - - // Now you can use the loadScript function with additional data function checkQueryParam() { const urlParams = new URLSearchParams(window.location.search); const paramName = 'search'; if (urlParams.has(paramName)) {