word-games-theme 2.6.1 → 2.6.2
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 +22 -18
- 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: 0b29e5cfde5e0c4a157d89b64af62c0570f135dd2b5cca369e2bff769a28ee6c
|
4
|
+
data.tar.gz: 97d33b64c47719c0b0fc2f34fa0bd533174fc3728e915f5225143765d79fba6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bc3aae8975934d5b740590871ae93d7eec6fc50acac24dc8aaf13384d60aa1b1b00471dc64800ee9a1bbb56ac359b468b0c1bab1df6bda50fddae8836b151e3
|
7
|
+
data.tar.gz: fbb016773aba70c5ecd6ec8b0708cd0267d2b290c285ff798b301c3e855531c2bbe23bd0ecbbdc2215adfc1e7cff2bfc22c180c579eeaf5134b7597177d53d45
|
@@ -78,6 +78,7 @@ const loadResource = (FILE_URL, data = {}, async = true, type = "text/javascript
|
|
78
78
|
if (type === "text/javascript") {
|
79
79
|
resourceEle = document.createElement("script");
|
80
80
|
resourceEle.src = FILE_URL;
|
81
|
+
resourceEle.classList.add("loaded-js");
|
81
82
|
} else if (type === "text/css") {
|
82
83
|
resourceEle = document.createElement("link");
|
83
84
|
resourceEle.rel = "stylesheet";
|
@@ -191,24 +192,27 @@ formElement.addEventListener("submit", function (e) {
|
|
191
192
|
url: "{{site.url}}",
|
192
193
|
range: "{{page.blanktilerange}}"
|
193
194
|
}
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
195
|
+
var loadJs = document.querySelector(".loaded-js");
|
196
|
+
if (loadJs == null) {
|
197
|
+
loadResource("/assets/css/wordfinder-result.css", additionalData, true, "text/css")
|
198
|
+
.then((data) => {
|
199
|
+
console.log("CSS loaded:", data);
|
200
|
+
})
|
201
|
+
.then(() => {
|
202
|
+
// Load the JavaScript file after the CSS file has loaded
|
203
|
+
loadResource("/assets/js/wordfinder.js", additionalData, true, "text/javascript")
|
204
|
+
.then((data) => {
|
205
|
+
console.log("JavaScript loaded:", data);
|
206
|
+
getData(txtBox.value.toLowerCase());
|
207
|
+
})
|
208
|
+
.catch((error) => {
|
209
|
+
console.error("Error loading JavaScript:", error);
|
210
|
+
});
|
211
|
+
})
|
212
|
+
.catch((error) => {
|
213
|
+
console.error("Error loading CSS:", error);
|
214
|
+
});
|
215
|
+
}
|
212
216
|
}
|
213
217
|
});
|
214
218
|
// Now you can use the loadScript function with additional data
|