word-games-theme 0.4.9 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_layouts/default.html +5 -3
- data/assets/js/wordScrabble.js +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae7a703fd548da0ced86c9e1a970ebb6815b8c8fd359db9691a76686a334fdcf
|
4
|
+
data.tar.gz: 2a19784fcf98b6b6ae224a2987c0816f4f9ce321dd907a3fac8005c9660dff1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a320ec9cf95b256118b01c8642c720c271835aeb43e7d369f414ba056ff98479d27fcfe747964a9f0c2075fcf3a763e9263d84c139cff7860e28ac46a756329
|
7
|
+
data.tar.gz: fd506de80acc49ec59bc9fc28867876ba1827f2efeea3ab4cf611f585fcd9b1364c91e96a9f2d7a653adfc6f1b9995727ae3f04d62691a6a1610cf525ac6a240
|
data/_layouts/default.html
CHANGED
@@ -44,13 +44,15 @@
|
|
44
44
|
let txtBox = document.querySelector('.txtBox')
|
45
45
|
txtBox.addEventListener('input', (e) => {
|
46
46
|
e.target.value = e.target.value.replace(/[^a-zA-Z? ]/g, "")
|
47
|
-
let rangeOfBlankTile = '{{ page.
|
48
|
-
if (rangeOfBlankTile ===
|
49
|
-
rangeOfBlankTile =
|
47
|
+
let rangeOfBlankTile = '{{ page.blanktilerange }}'
|
48
|
+
if (rangeOfBlankTile === "") {
|
49
|
+
rangeOfBlankTile = 5
|
50
50
|
}
|
51
51
|
e.target.value = e.target.value.replace(/ /g, '?')
|
52
52
|
let data = []
|
53
53
|
data = e.target.value.split('').filter((i) => i === '?')
|
54
|
+
console.log(data.length)
|
55
|
+
console.log(rangeOfBlankTile)
|
54
56
|
if (data.length > rangeOfBlankTile) {
|
55
57
|
e.target.value = e.target.value.replace(/\?$/, '')
|
56
58
|
}
|
data/assets/js/wordScrabble.js
CHANGED
@@ -34,11 +34,11 @@ var sortBool = false
|
|
34
34
|
|
35
35
|
let txtBox = document.querySelector('.txtBox')
|
36
36
|
txtBox.value = serachValue
|
37
|
-
txtBox.addEventListener('
|
37
|
+
txtBox.addEventListener('input', (e) => {
|
38
38
|
let rangeOfBlankTile = script.dataset.range
|
39
39
|
e.target.value = e.target.value.replace(/[^a-zA-Z? ]/g, '')
|
40
|
-
if (rangeOfBlankTile ===
|
41
|
-
rangeOfBlankTile =
|
40
|
+
if (rangeOfBlankTile === '') {
|
41
|
+
rangeOfBlankTile = 5
|
42
42
|
}
|
43
43
|
e.target.value = e.target.value.replace(/ /g, '?')
|
44
44
|
let data = []
|
@@ -80,7 +80,7 @@ const getData = async (serachValue) => {
|
|
80
80
|
</div>`
|
81
81
|
/// loader
|
82
82
|
const response = await fetch(
|
83
|
-
|
83
|
+
`/.netlify/functions/getWords?name=${serachValue}&selecteddictionary=${selectedDictionary}`
|
84
84
|
)
|
85
85
|
const data = await response.json()
|
86
86
|
main.innerHTML = ''
|