word-games-theme 2.6.1 → 2.6.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
- loadResource("/assets/css/wordfinder-result.css", additionalData, true, "text/css")
195
- .then((data) => {
196
- console.log("CSS loaded:", data);
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
- });
208
- })
209
- .catch((error) => {
210
- console.error("Error loading CSS:", error);
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
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.6.1
4
+ version: 2.6.3
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-26 00:00:00.000000000 Z
11
+ date: 2024-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -286,6 +286,7 @@ files:
286
286
  - assets/images/board-game.png
287
287
  - assets/images/check.svg
288
288
  - assets/images/close-btn.svg
289
+ - assets/images/close-button.svg
289
290
  - assets/images/close.png
290
291
  - assets/images/copy.svg
291
292
  - assets/images/debosmita.jpeg
@@ -293,8 +294,10 @@ files:
293
294
  - assets/images/facebook-square.svg
294
295
  - assets/images/facebook.svg
295
296
  - assets/images/facebooks.svg
297
+ - assets/images/filter.svg
296
298
  - assets/images/footer.png
297
299
  - assets/images/footer2-bg.webp
300
+ - assets/images/hamburger-menu.svg
298
301
  - assets/images/header.svg
299
302
  - assets/images/hero-media-illustration-dark.svg
300
303
  - assets/images/hero-media-illustration-light.svg
@@ -307,6 +310,8 @@ files:
307
310
  - assets/images/karuna.png
308
311
  - assets/images/keshav.webp
309
312
  - assets/images/krutika.jpeg
313
+ - assets/images/langauge.svg
314
+ - assets/images/left.svg
310
315
  - assets/images/left_obj_01 (1).svg
311
316
  - assets/images/left_obj_01.png
312
317
  - assets/images/left_obj_01.svg
@@ -327,6 +332,7 @@ files:
327
332
  - assets/images/questionmark.svg
328
333
  - assets/images/rating.webp
329
334
  - assets/images/ratingStar.png
335
+ - assets/images/right-icon.svg
330
336
  - assets/images/right.png
331
337
  - assets/images/right.svg
332
338
  - assets/images/right2.svg