Sha256: a7237e42bd5f291a85249e11c6e5a568d61bc1bc80f31c6c6b14a15c017ff4cc

Contents?: true

Size: 1.38 KB

Versions: 18

Compression:

Stored size: 1.38 KB

Contents

let letterCloseButton = document.querySelector('.letter-close-button')
let txtBox = document.querySelector('.txtBox')
let focusBorder = document.querySelector('.focus-border')
txtBox.focus()

function myFunction(x) {
    if (x.matches) {
        txtBox.addEventListener("click", () => {
            document.documentElement.scrollTop = 200
            setTimeout(() => {
                document.documentElement.scrollTop = 200
            }, 150);
        })
    } else {
        console.log("false");
    }
}
var x = window.matchMedia("(max-width: 768px)")
myFunction(x)
x.addListener(myFunction)

txtBox.addEventListener('input', (e) => {
    if (e.target.value === "") {
        letterCloseButton.classList.remove("close_ltr_icon")
    }
    else {
        letterCloseButton.classList.add("close_ltr_icon")
    }

    focusBorder.classList.remove("focus-border")
    e.target.value = e.target.value.replace(/[^a-zA-Z? ]/g, "")
    let rangeOfBlankTile = 3
    if (rangeOfBlankTile === "") {
        rangeOfBlankTile = 3
    }
    e.target.value = e.target.value.replace(/ /g, '?')
    let data = []
    data = e.target.value.split('').filter((i) => i === '?')
    if (data.length > rangeOfBlankTile) {
        e.target.value = e.target.value.replace(/\?$/, '')
    }
})

letterCloseButton.addEventListener("click", () => {
    txtBox.value = ""
    letterCloseButton.classList.remove("close_ltr_icon")
})

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
word-games-theme-1.7.8 assets/js/default.js
word-games-theme-1.7.7 assets/js/default.js
word-games-theme-1.7.6 assets/js/default.js
word-games-theme-1.7.5 assets/js/default.js
word-games-theme-1.7.3 assets/js/default.js
word-games-theme-1.7.2 assets/js/default.js
word-games-theme-1.7.1 assets/js/default.js
word-games-theme-1.7.0 assets/js/default.js
word-games-theme-1.6.9 assets/js/default.js
word-games-theme-1.6.8 assets/js/default.js
word-games-theme-1.6.7 assets/js/default.js
word-games-theme-1.6.6 assets/js/default.js
word-games-theme-1.6.5 assets/js/default.js
word-games-theme-1.6.4 assets/js/default.js
word-games-theme-1.6.3 assets/js/default.js
word-games-theme-1.6.2 assets/js/default.js
word-games-theme-1.6.1 assets/js/default.js
word-games-theme-1.6.0 assets/js/default.js