word-games-theme 2.5.4 → 2.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/js/wordfinder-home.js +38 -18
- data/assets/js/xletter-home.js +36 -27
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 574b8489526d0d0cc8dfb240ba686abf2f3a0836ecc8a05fea4baf7bfa8854f9
|
4
|
+
data.tar.gz: ab5cbf38573d8c7930bf04a3b32568f70cdd5b1e4042809d6bb957286f2eb757
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a844e397e2c79e3f8eacb7c200de55d444b198780e983acc8346a0e0383a905711b17abf7dd761109bd7da5a7b3ef626fd770efde9fbacff2bce14f79314c001
|
7
|
+
data.tar.gz: 7bc3ae38414e2c4092a54297c6552f850a5298a289ffc647f1ae184381fadd7025a4f402e91e2da5b09cbea88406ad5a0743a4e13dd06367abe264bde6a9453e
|
@@ -8,6 +8,9 @@ let exculdeWith = document.getElementById("exculdeWith");
|
|
8
8
|
let inculdeWith = document.getElementById("inculdeWith");
|
9
9
|
let wordLength = document.getElementById("wordLength");
|
10
10
|
|
11
|
+
const serachSection = document.querySelector(".serachSection");
|
12
|
+
let rangeOfBlankTile = serachSection.dataset.range;
|
13
|
+
|
11
14
|
// // when typing on input
|
12
15
|
txtBox.addEventListener('input', (e) => {
|
13
16
|
if (e.target.value === "") {
|
@@ -74,9 +77,11 @@ const loadResource = (FILE_URL, data = {}, async = true, type = "text/javascript
|
|
74
77
|
|
75
78
|
if (type === "text/javascript") {
|
76
79
|
resourceEle = document.createElement("script");
|
80
|
+
resourceEle.src = FILE_URL;
|
77
81
|
} else if (type === "text/css") {
|
78
82
|
resourceEle = document.createElement("link");
|
79
83
|
resourceEle.rel = "stylesheet";
|
84
|
+
resourceEle.href = FILE_URL;
|
80
85
|
} else {
|
81
86
|
reject({
|
82
87
|
status: false,
|
@@ -87,7 +92,6 @@ const loadResource = (FILE_URL, data = {}, async = true, type = "text/javascript
|
|
87
92
|
|
88
93
|
resourceEle.type = type;
|
89
94
|
resourceEle.async = async;
|
90
|
-
resourceEle.href = FILE_URL;
|
91
95
|
|
92
96
|
Object.keys(data).forEach((key) => {
|
93
97
|
resourceEle.setAttribute(`data-${key}`, data[key]);
|
@@ -105,6 +109,8 @@ const loadResource = (FILE_URL, data = {}, async = true, type = "text/javascript
|
|
105
109
|
});
|
106
110
|
|
107
111
|
if (type === "text/javascript") {
|
112
|
+
// console.log(resourceEle);
|
113
|
+
// console.log(FILE_URL);
|
108
114
|
document.body.appendChild(resourceEle);
|
109
115
|
} else if (type === "text/css") {
|
110
116
|
document.head.appendChild(resourceEle);
|
@@ -114,6 +120,13 @@ const loadResource = (FILE_URL, data = {}, async = true, type = "text/javascript
|
|
114
120
|
const formElement = document.querySelector("#form");
|
115
121
|
formElement.addEventListener("submit", function (e) {
|
116
122
|
e.preventDefault();
|
123
|
+
let quesMark = "?";
|
124
|
+
if (rangeOfBlankTile) {
|
125
|
+
if (!txtBox.value.includes("?")) {
|
126
|
+
txtBox.value = txtBox.value + quesMark.repeat(rangeOfBlankTile); //
|
127
|
+
txtBox.value = txtBox.value;
|
128
|
+
}
|
129
|
+
}
|
117
130
|
|
118
131
|
document.querySelector(".fillterWrapper").classList.add("hide")
|
119
132
|
let selectedDictionary = document.querySelector(".select_dropDown2").value;
|
@@ -181,16 +194,20 @@ formElement.addEventListener("submit", function (e) {
|
|
181
194
|
loadResource("/assets/css/wordfinder-result.css", additionalData, true, "text/css")
|
182
195
|
.then((data) => {
|
183
196
|
console.log("CSS loaded:", data);
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
197
|
+
})
|
198
|
+
.then(() => {
|
199
|
+
// Load the JavaScript file after the CSS file has loaded
|
200
|
+
loadResource("/assets/js/wordfinder.js", additionalData, true, "text/javascript")
|
201
|
+
.then((data) => {
|
202
|
+
console.log("JavaScript loaded:", data);
|
203
|
+
getData(txtBox.value.toLowerCase());
|
204
|
+
})
|
205
|
+
.catch((error) => {
|
206
|
+
console.error("Error loading JavaScript:", error);
|
207
|
+
});
|
191
208
|
})
|
192
209
|
.catch((error) => {
|
193
|
-
console.error("Error loading
|
210
|
+
console.error("Error loading CSS:", error);
|
194
211
|
});
|
195
212
|
}
|
196
213
|
});
|
@@ -206,17 +223,20 @@ function checkQueryParam() {
|
|
206
223
|
loadResource("/assets/css/wordfinder-result.css", additionalData, true, "text/css")
|
207
224
|
.then((data) => {
|
208
225
|
console.log("CSS loaded:", data);
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
226
|
+
})
|
227
|
+
.then(() => {
|
228
|
+
// Load the JavaScript file after the CSS file has loaded
|
229
|
+
loadResource("/assets/js/wordfinder.js", additionalData, true, "text/javascript")
|
230
|
+
.then((data) => {
|
231
|
+
console.log("JavaScript loaded:", data);
|
232
|
+
getData(txtBox.value.toLowerCase());
|
233
|
+
})
|
234
|
+
.catch((error) => {
|
235
|
+
console.error("Error loading JavaScript:", error);
|
236
|
+
});
|
217
237
|
})
|
218
238
|
.catch((error) => {
|
219
|
-
console.error("Error loading
|
239
|
+
console.error("Error loading CSS:", error);
|
220
240
|
});
|
221
241
|
}
|
222
242
|
}
|
data/assets/js/xletter-home.js
CHANGED
@@ -73,9 +73,11 @@ const loadResource = (FILE_URL, async = true, type = "text/javascript") => {
|
|
73
73
|
|
74
74
|
if (type === "text/javascript") {
|
75
75
|
resourceEle = document.createElement("script");
|
76
|
+
resourceEle.src = FILE_URL;
|
76
77
|
} else if (type === "text/css") {
|
77
78
|
resourceEle = document.createElement("link");
|
78
79
|
resourceEle.rel = "stylesheet";
|
80
|
+
resourceEle.href = FILE_URL;
|
79
81
|
} else {
|
80
82
|
reject({
|
81
83
|
status: false,
|
@@ -86,7 +88,7 @@ const loadResource = (FILE_URL, async = true, type = "text/javascript") => {
|
|
86
88
|
|
87
89
|
resourceEle.type = type;
|
88
90
|
resourceEle.async = async;
|
89
|
-
|
91
|
+
|
90
92
|
|
91
93
|
|
92
94
|
resourceEle.addEventListener("load", () => {
|
@@ -171,19 +173,23 @@ formElement.addEventListener("submit", function (e) {
|
|
171
173
|
const paramName = 'search';
|
172
174
|
if (new URLSearchParams(window.location.search).has(paramName)) {
|
173
175
|
loadResource("/assets/css/wordfinder-result.css", true, "text/css")
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
176
|
+
.then((data) => {
|
177
|
+
console.log("CSS loaded:", data);
|
178
|
+
})
|
179
|
+
.then(() => {
|
180
|
+
// Load the JavaScript file after the CSS file has loaded
|
181
|
+
loadResource("/assets/js/xletter-result.js", true, "text/javascript")
|
182
|
+
.then((data) => {
|
183
|
+
console.log("JavaScript loaded:", data);
|
180
184
|
getData(txtBox.value.toLowerCase());
|
181
|
-
}
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
185
|
+
})
|
186
|
+
.catch((error) => {
|
187
|
+
console.error("Error loading JavaScript:", error);
|
188
|
+
});
|
189
|
+
})
|
190
|
+
.catch((error) => {
|
191
|
+
console.error("Error loading CSS:", error);
|
192
|
+
});
|
187
193
|
}
|
188
194
|
});
|
189
195
|
|
@@ -192,21 +198,24 @@ function checkQueryParam() {
|
|
192
198
|
const urlParams = new URLSearchParams(window.location.search);
|
193
199
|
const paramName = 'search';
|
194
200
|
if (urlParams.has(paramName)) {
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
201
|
+
loadResource("/assets/css/wordfinder-result.css", true, "text/css")
|
202
|
+
.then((data) => {
|
203
|
+
console.log("CSS loaded:", data);
|
204
|
+
})
|
205
|
+
.then(() => {
|
206
|
+
// Load the JavaScript file after the CSS file has loaded
|
207
|
+
loadResource("/assets/js/xletter-result.js", true, "text/javascript")
|
208
|
+
.then((data) => {
|
209
|
+
console.log("JavaScript loaded:", data);
|
203
210
|
getData(txtBox.value.toLowerCase());
|
204
|
-
}
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
211
|
+
})
|
212
|
+
.catch((error) => {
|
213
|
+
console.error("Error loading JavaScript:", error);
|
214
|
+
});
|
215
|
+
})
|
216
|
+
.catch((error) => {
|
217
|
+
console.error("Error loading CSS:", error);
|
218
|
+
});
|
210
219
|
}
|
211
220
|
}
|
212
221
|
checkQueryParam();
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: word-games-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- manpreet-appscms
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|