assets/js/X-letter.js in word-games-theme-0.9.4 vs assets/js/X-letter.js in word-games-theme-0.9.5

- old
+ new

@@ -2,11 +2,10 @@ --- const getScript=document.currentScript const letterLen = getScript.dataset.letter const ablank = getScript.dataset.ablank -const siteName = getScript.dataset.name const siteUrl = getScript.dataset.url let errorMsg = document.querySelector('.errorMsg') let script = document.currentScript let wordCount = document.querySelector('.wordCount') @@ -24,10 +23,13 @@ let tab_link_wrapper = document.querySelector('.tab_link_wrapper') tab_link_wrapper.style.display = "none" +let home_page_search_result = document.querySelector("#home_page_search_result") +let homePageSearchResult = `/result?search=${serachValue}&dictionary=Dictionary&prefix=&contains=&suffix=&exculde=&inculde=&length=`; + let txtBox = document.querySelector('.txtBox') txtBox.focus() txtBox.value = serachValue @@ -262,16 +264,11 @@ // ` // let tabs = document.getElementsByClassName('tab_link') // tabs[0] ? tabs[0].classList.add('active-tab') : '' - -if(siteName == "wordswithletters"){ - let home_page_search_result = document.querySelector("#home_page_search_result") - let homePageSearchResult = `/result?search=${serachValue}&dictionary=Dictionary&prefix=&contains=&suffix=&exculde=&inculde=&length=`; home_page_search_result.href = homePageSearchResult home_page_search_result.innerHTML = `See words of any length with letters ${serachValue.split("")}` -} main.innerHTML += ` <div class="allGroupWords"> <div class="wordListHeading">