word-games-theme 2.6.9 → 2.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5084b4dc9c2614ed9647ca741c03ee93e8fbcefce6fa8dfe5565c42bf663a915
4
- data.tar.gz: ffedbb712145c2b34631d237383d8ac5686d24f9f4819d696e416bde015a1605
3
+ metadata.gz: fa6b5d2626682b813605058ed8d761a3fd01167d07c83377bc01b810c1e148f2
4
+ data.tar.gz: 74d110d207334c2b00f08a3180cbba582bd189577089b9b64f50a32d31b57e91
5
5
  SHA512:
6
- metadata.gz: 367fe83fe2f0445ba6925ba7b7979b2cee0fcbd0db0d76e9eb3799382043607450a75ec7094c78e8282e53a84060c2f6557cc8ddda578ba0e4828f8b391f9c9a
7
- data.tar.gz: 6c3f8413ff16050e37cc3f9603151682391a1c8b6c4e74e61f369c5e9f2bce6e76a4f445cf879f0d020d33363a16d84e24116efcb2b9a903342b7d329811282b
6
+ metadata.gz: 3908ca69d49cb55fd9d175eed49b5a791bab3480a166fe48e92a423efa0bc64bb8b2615a37309b47b445b56955e83e0986eb9efef018535d63023c291ab2450a
7
+ data.tar.gz: 9ca3a12a3443e92c3e20742ca7c33630cf36242546885a2e9e05aca0cd52f6a1dd8d4d00e8fc688f63c5c4decd38ec4b77d6b62257969c83522a54296c46e632
@@ -5,6 +5,8 @@
5
5
  </button>
6
6
  </div>
7
7
 
8
+
9
+
8
10
  <div class="fillterWrapper my-5 filterShow">
9
11
  <div class="startsWith">
10
12
  <input class="filter_val" autocomplete="off" type="text" id="startsWith" placeholder="Starts with" value=""
@@ -19,7 +19,7 @@
19
19
  {% endif %}
20
20
  <button id="button-toggle" class="navbar-toggler" type="button" data-toggle="collapse"
21
21
  data-target="#navbarSupportedContent" aria-label="bars-toggle-icon">
22
- <img src="/assets/images/hamburger-menu.svg" alt="hamburger-menu">
22
+ <img src="/assets/images/hamburger-menu.svg" alt="hamburger-menu" width="30px" height="30px">
23
23
  </button>
24
24
  <div class="mobile-top-bar collapse navbar-collapse justify-content-end" id="navbarSupportedContent">
25
25
  <div class="navbar-nav">
@@ -5,6 +5,8 @@
5
5
  <div class="mt-4 top-banner-ad"></div>
6
6
  <div class="mt-4 bottom-banner-ad"></div>
7
7
  <div class="container">
8
+
9
+
8
10
  <div class="pageHeading text-center" style="margin:22px 0px">
9
11
  <h1 class="heading pb-0 mb-3">
10
12
  {{dataToShow.h1}}</h1>
@@ -1,4 +1,5 @@
1
1
  {%- if site.noResultPage or page.noResultPage -%}
2
+
2
3
  <div class="serachSection" data-url="{{site.url}}" data-range="{{page.blanktilerange}}" data-letter="{{page.letter}}" data-ablank="{{page.ablank}}">
3
4
  <div class="position-relative serachBox">
4
5
  <form id='form' method="GET">
@@ -39,6 +40,7 @@
39
40
 
40
41
  {%- else -%}
41
42
  <div class="container-fluid" id="containerWd">
43
+
42
44
  <div class="serachSection">
43
45
  <div class="position-relative serachBox">
44
46
  <form action="{% if page.url == '/' %}/result{% else %}{{page.url}}/result{% endif %}" id='form'
@@ -76,11 +76,12 @@
76
76
  <ul class="ul list-unstyled">
77
77
  {%- for item in scrabblewords %}
78
78
  {%- assign value = item.word -%}
79
- <a class="anchor__style" title="Lookup python in Dictionary" target="_blank"
80
- href="/word-meaning?search={{item.word}}">
81
- <li class="list_word">{{item.word}}
79
+ <a class="anchor__style" title="Lookup {{value}} in Dictionary" target="_blank" href="/word-meaning?search={{item.word}}">
80
+ <li class="list_word">
81
+ <span>{{item.word}}</span>
82
82
  <span class="points" value="14" style="position:relative; top:4px; font-size:12px">
83
- {{item.points}}</span>
83
+ {{item.points}}
84
+ </span>
84
85
  </li>
85
86
  </a>
86
87
  {%- endfor -%}
@@ -62,10 +62,10 @@
62
62
  {%- if page.language -%}
63
63
  <script>
64
64
  const select_dropDown2 = document.querySelector(".select_dropDown2")
65
- select_dropDown2[0].style.display = "none"
66
- select_dropDown2[1].style.display = "none"
67
- select_dropDown2[2].style.display = "none"
68
- select_dropDown2[3].style.display = "none"
65
+ select_dropDown2.style.display = "none"
66
+ // select_dropDown2[1].style.display = "none"
67
+ // select_dropDown2[2].style.display = "none"
68
+ // select_dropDown2[3].style.display = "none"
69
69
  </script>
70
70
  {%- endif -%}
71
71
 
data/_layouts/page.html CHANGED
@@ -18,8 +18,11 @@
18
18
 
19
19
  {%- include script.html -%}
20
20
 
21
+
22
+
21
23
  {%- if site.versioning -%}
22
24
 
25
+
23
26
  <script defer src="{{ site.baseurl }}/{% ministamp assets/js/leftNav.js assets/js/leftNav.js %}"></script>
24
27
  {%- if page.tool == "words-that-start-with-the-letters" -%}
25
28
  <script defer src="{{ site.baseurl }}/{% ministamp assets/js/words-starting-with.js assets/js/words-starting-with.js %}"></script>
@@ -46,6 +49,15 @@
46
49
  {%- endif -%}
47
50
 
48
51
 
52
+
53
+
54
+
55
+ {%- if page.language -%}
56
+ <script>
57
+ select_dropDown2.style.display = "none"
58
+ </script>
59
+ {%- endif -%}
60
+
49
61
  </body>
50
62
 
51
63
  </html>
@@ -80,12 +80,15 @@
80
80
  {%- if page.language -%}
81
81
  <script>
82
82
  const select_dropDown2 = document.querySelector(".select_dropDown2")
83
- select_dropDown2[0].style.display = "none"
83
+ select_dropDown2select_dropDown2.style.display = "none"
84
84
  select_dropDown2[1].style.display = "none"
85
85
  select_dropDown2[2].style.display = "none"
86
86
  select_dropDown2[3].style.display = "none"
87
87
  </script>
88
88
  {%- endif -%}
89
+
90
+
91
+
89
92
  <script defer src="/assets/js/theme.js"></script>
90
93
 
91
94
  {%- if site.noResultPage and page.letter-%}
@@ -0,0 +1,251 @@
1
+ let txtBox = document.querySelector('.txtBox')
2
+ txtBox.focus()
3
+ let letterCloseButton = document.querySelector('.letter-close-button')
4
+ let startsWith = document.getElementById("startsWith");
5
+ let mustInclude = document.getElementById("mustInclude");
6
+ let endsWith = document.getElementById("endsWith");
7
+ let exculdeWith = document.getElementById("exculdeWith");
8
+ let inculdeWith = document.getElementById("inculdeWith");
9
+ let wordLength = document.getElementById("wordLength");
10
+
11
+ const serachSection = document.querySelector(".serachSection");
12
+ let rangeOfBlankTile = serachSection.dataset.range;
13
+
14
+ // // when typing on input
15
+ txtBox.addEventListener('input', (e) => {
16
+ if (e.target.value === "") {
17
+ letterCloseButton.style.display = "none"
18
+ }
19
+ else {
20
+ letterCloseButton.style.display = "block"
21
+ }
22
+ e.target.value = e.target.value.replace(/[^a-zA-Z? ]/g, "")
23
+ let rangeOfBlankTile = 3
24
+ if (rangeOfBlankTile === "") {
25
+ rangeOfBlankTile = 3
26
+ }
27
+ e.target.value = e.target.value.replace(/ /g, '?')
28
+ let data = []
29
+ data = e.target.value.split('').filter((i) => i === '?')
30
+ if (data.length > rangeOfBlankTile) {
31
+ e.target.value = e.target.value.replace(/\?$/, '')
32
+ }
33
+ })
34
+ letterCloseButton.addEventListener("click", () => {
35
+ txtBox.value = ""
36
+ letterCloseButton.style.display = "none"
37
+ })
38
+ //tooltips for advanced filter
39
+ const filterInputs = document.querySelectorAll('.filter_val');
40
+ Array.from(filterInputs).forEach((item) => {
41
+ item.addEventListener("input", (e) => {
42
+ const inputValue = e.target.value;
43
+ const parentElement = e.target.parentElement;
44
+ const imgElement = parentElement.querySelector('img');
45
+ const tooltipElement = parentElement.querySelector('.filter-tooltip');
46
+
47
+ if (inputValue == "") {
48
+ imgElement.src = "/assets/images/questionmark.svg"
49
+ setTimeout(() => {
50
+ item.nextElementSibling.setAttribute("data-tip", item.nextElementSibling.id)
51
+ }, 100);
52
+ tooltipElement.style.setProperty('--tooltip-padding', '0.5rem');
53
+ tooltipElement.style.setProperty('--tooltip-border-style', 'soild');
54
+
55
+ } else {
56
+ item.nextElementSibling.removeAttribute("data-tip")
57
+ imgElement.src = "/assets/images/close-btn.svg"
58
+ tooltipElement.style.setProperty('--tooltip-padding', '0');
59
+ tooltipElement.style.setProperty('--tooltip-border-style', 'none');
60
+ }
61
+ item.nextElementSibling.addEventListener("click", () => {
62
+ e.target.value = ""
63
+ imgElement.src = "/assets/images/questionmark.svg"
64
+ setTimeout(() => {
65
+ item.nextElementSibling.setAttribute("data-tip", item.nextElementSibling.id)
66
+ }, 100);
67
+ tooltipElement.style.setProperty('--tooltip-padding', '0.5rem');
68
+ tooltipElement.style.setProperty('--tooltip-border-style', 'soild');
69
+ })
70
+ })
71
+ })
72
+
73
+
74
+ const loadResource = (FILE_URL, data = {}, async = true, type = "text/javascript") => {
75
+ return new Promise((resolve, reject) => {
76
+ let resourceEle;
77
+
78
+ if (type === "text/javascript") {
79
+ resourceEle = document.createElement("script");
80
+ resourceEle.src = FILE_URL;
81
+ resourceEle.classList.add("loaded-js");
82
+ } else if (type === "text/css") {
83
+ resourceEle = document.createElement("link");
84
+ resourceEle.rel = "stylesheet";
85
+ resourceEle.href = FILE_URL;
86
+ } else {
87
+ reject({
88
+ status: false,
89
+ message: `Unsupported resource type: ${type}`,
90
+ });
91
+ return;
92
+ }
93
+
94
+ resourceEle.type = type;
95
+ resourceEle.async = async;
96
+
97
+ Object.keys(data).forEach((key) => {
98
+ resourceEle.setAttribute(`data-${key}`, data[key]);
99
+ });
100
+
101
+ resourceEle.addEventListener("load", () => {
102
+ resolve({ status: true });
103
+ });
104
+
105
+ resourceEle.addEventListener("error", () => {
106
+ reject({
107
+ status: false,
108
+ message: `Failed to load the resource ${FILE_URL}`,
109
+ });
110
+ });
111
+
112
+ if (type === "text/javascript") {
113
+ // console.log(resourceEle);
114
+ // console.log(FILE_URL);
115
+ document.body.appendChild(resourceEle);
116
+ } else if (type === "text/css") {
117
+ document.head.appendChild(resourceEle);
118
+ }
119
+ });
120
+ };
121
+ const formElement = document.querySelector("#form");
122
+ formElement.addEventListener("submit", function (e) {
123
+ e.preventDefault();
124
+ if (txtBox.value != "" || startsWith.value != "" || endsWith.value != "" || mustInclude.value != "" || exculdeWith.value != "" || inculdeWith.value != "" || wordLength.value != "") {
125
+ let quesMark = "?";
126
+ if (rangeOfBlankTile) {
127
+ if (!txtBox.value.includes("?")) {
128
+ txtBox.value = txtBox.value + quesMark.repeat(rangeOfBlankTile); //
129
+ txtBox.value = txtBox.value;
130
+ }
131
+ }
132
+ document.querySelector(".fillterWrapper").classList.add("hide")
133
+ let selectedDictionary = document.querySelector(".select_dropDown2").value;
134
+ if (history.pushState) {
135
+ var newurl =
136
+ window.location.protocol +
137
+ "//" +
138
+ window.location.host +
139
+ window.location.pathname +
140
+ "?" +
141
+ "search" +
142
+ "=" +
143
+ txtBox.value.toLowerCase() +
144
+ "&" +
145
+ "dictionary" +
146
+ "=" +
147
+ selectedDictionary +
148
+ "&" +
149
+ "prefix" +
150
+ "=" +
151
+ startsWith.value +
152
+ "&" +
153
+ "contains" +
154
+ "=" +
155
+ mustInclude.value +
156
+ "&" +
157
+ "suffix" +
158
+ "=" +
159
+ endsWith.value +
160
+ "&" +
161
+ "exclude" +
162
+ "=" +
163
+ exculdeWith.value +
164
+ "&" +
165
+ "include" +
166
+ "=" +
167
+ inculdeWith.value +
168
+ "&" +
169
+ "length" +
170
+ "=" +
171
+ wordLength.value;
172
+ window.history.pushState({ path: newurl }, "", newurl);
173
+
174
+ const params = new URLSearchParams(window.location.search);
175
+ serachValue = params.get("search");
176
+ prefixValue = params.get("prefix");
177
+ containsValue = params.get("contains");
178
+ suffixValue = params.get("suffix");
179
+ exculdeValue = params.get("exclude");
180
+ includeValue = params.get("include");
181
+ lengthValue = params.get("length");
182
+ dictonary = params.get("dictionary");
183
+
184
+ gtag("event", "page_view", {
185
+ page_location: window.location.pathname + location.search,
186
+ });
187
+ }
188
+ const paramName = 'search';
189
+ if (new URLSearchParams(window.location.search).has(paramName)) {
190
+ const additionalData = {
191
+ url: "{{site.url}}",
192
+ range: "{{page.blanktilerange}}"
193
+ }
194
+ var loadJs = document.querySelector(".loaded-js");
195
+ if (loadJs == null) {
196
+ loadResource("/assets/css/wordfinder-result.css", additionalData, true, "text/css")
197
+ .then((data) => {
198
+ console.log("CSS loaded:", data);
199
+ })
200
+ .then(() => {
201
+ // Load the JavaScript file after the CSS file has loaded
202
+ loadResource("/assets/js/other-lang-wordScrabble.js", additionalData, true, "text/javascript")
203
+ .then((data) => {
204
+ console.log("JavaScript loaded:", data);
205
+ getData(txtBox.value.toLowerCase());
206
+ })
207
+ .catch((error) => {
208
+ console.error("Error loading JavaScript:", error);
209
+ });
210
+ })
211
+ .catch((error) => {
212
+ console.error("Error loading CSS:", error);
213
+ });
214
+ }
215
+ }
216
+ } else {
217
+ console.log("Please Enter Valid Letters.");
218
+ }
219
+ });
220
+ // Now you can use the loadScript function with additional data
221
+ function checkQueryParam() {
222
+ const urlParams = new URLSearchParams(window.location.search);
223
+ const paramName = 'search';
224
+ if (urlParams.has(paramName)) {
225
+ const additionalData = {
226
+ url: "{{site.url}}",
227
+ range: "{{page.blanktilerange}}"
228
+ };
229
+ loadResource("/assets/css/wordfinder-result.css", additionalData, true, "text/css")
230
+ .then((data) => {
231
+ console.log("CSS loaded:", data);
232
+ })
233
+ .then(() => {
234
+ // Load the JavaScript file after the CSS file has loaded
235
+ loadResource("/assets/js/other-lang-wordScrabble.js", additionalData, true, "text/javascript")
236
+ .then((data) => {
237
+ console.log("JavaScript loaded:", data);
238
+ getData(txtBox.value.toLowerCase());
239
+ })
240
+ .catch((error) => {
241
+ console.error("Error loading JavaScript:", error);
242
+ });
243
+ })
244
+ .catch((error) => {
245
+ console.error("Error loading CSS:", error);
246
+ });
247
+ }
248
+ }
249
+ checkQueryParam();
250
+
251
+
@@ -121,98 +121,100 @@ const loadResource = (FILE_URL, data = {}, async = true, type = "text/javascript
121
121
  const formElement = document.querySelector("#form");
122
122
  formElement.addEventListener("submit", function (e) {
123
123
  e.preventDefault();
124
- let quesMark = "?";
125
- if (rangeOfBlankTile) {
126
- if (!txtBox.value.includes("?")) {
127
- txtBox.value = txtBox.value + quesMark.repeat(rangeOfBlankTile); //
128
- txtBox.value = txtBox.value;
124
+ if (txtBox.value != "" || startsWith.value != "" || endsWith.value != "" || mustInclude.value != "" || exculdeWith.value != "" || inculdeWith.value != "" || wordLength.value != "") {
125
+ let quesMark = "?";
126
+ if (rangeOfBlankTile) {
127
+ if (!txtBox.value.includes("?")) {
128
+ txtBox.value = txtBox.value + quesMark.repeat(rangeOfBlankTile); //
129
+ txtBox.value = txtBox.value;
130
+ }
129
131
  }
130
- }
131
-
132
- document.querySelector(".fillterWrapper").classList.add("hide")
133
- let selectedDictionary = document.querySelector(".select_dropDown2").value;
134
- if (history.pushState) {
135
- var newurl =
136
- window.location.protocol +
137
- "//" +
138
- window.location.host +
139
- window.location.pathname +
140
- "?" +
141
- "search" +
142
- "=" +
143
- txtBox.value.toLowerCase() +
144
- "&" +
145
- "dictionary" +
146
- "=" +
147
- selectedDictionary +
148
- "&" +
149
- "prefix" +
150
- "=" +
151
- startsWith.value +
152
- "&" +
153
- "contains" +
154
- "=" +
155
- mustInclude.value +
156
- "&" +
157
- "suffix" +
158
- "=" +
159
- endsWith.value +
160
- "&" +
161
- "exclude" +
162
- "=" +
163
- exculdeWith.value +
164
- "&" +
165
- "include" +
166
- "=" +
167
- inculdeWith.value +
168
- "&" +
169
- "length" +
170
- "=" +
171
- wordLength.value;
172
- window.history.pushState({ path: newurl }, "", newurl);
173
-
174
- const params = new URLSearchParams(window.location.search);
175
- serachValue = params.get("search");
176
- prefixValue = params.get("prefix");
177
- containsValue = params.get("contains");
178
- suffixValue = params.get("suffix");
179
- exculdeValue = params.get("exclude");
180
- includeValue = params.get("include");
181
- lengthValue = params.get("length");
182
- dictonary = params.get("dictionary");
183
-
184
- gtag("event", "page_view", {
185
- page_location: window.location.pathname + location.search,
186
- });
187
- }
188
-
189
- const paramName = 'search';
190
- if (new URLSearchParams(window.location.search).has(paramName)) {
191
- const additionalData = {
192
- url: "{{site.url}}",
193
- range: "{{page.blanktilerange}}"
132
+ document.querySelector(".fillterWrapper").classList.add("hide")
133
+ let selectedDictionary = document.querySelector(".select_dropDown2").value;
134
+ if (history.pushState) {
135
+ var newurl =
136
+ window.location.protocol +
137
+ "//" +
138
+ window.location.host +
139
+ window.location.pathname +
140
+ "?" +
141
+ "search" +
142
+ "=" +
143
+ txtBox.value.toLowerCase() +
144
+ "&" +
145
+ "dictionary" +
146
+ "=" +
147
+ selectedDictionary +
148
+ "&" +
149
+ "prefix" +
150
+ "=" +
151
+ startsWith.value +
152
+ "&" +
153
+ "contains" +
154
+ "=" +
155
+ mustInclude.value +
156
+ "&" +
157
+ "suffix" +
158
+ "=" +
159
+ endsWith.value +
160
+ "&" +
161
+ "exclude" +
162
+ "=" +
163
+ exculdeWith.value +
164
+ "&" +
165
+ "include" +
166
+ "=" +
167
+ inculdeWith.value +
168
+ "&" +
169
+ "length" +
170
+ "=" +
171
+ wordLength.value;
172
+ window.history.pushState({ path: newurl }, "", newurl);
173
+
174
+ const params = new URLSearchParams(window.location.search);
175
+ serachValue = params.get("search");
176
+ prefixValue = params.get("prefix");
177
+ containsValue = params.get("contains");
178
+ suffixValue = params.get("suffix");
179
+ exculdeValue = params.get("exclude");
180
+ includeValue = params.get("include");
181
+ lengthValue = params.get("length");
182
+ dictonary = params.get("dictionary");
183
+
184
+ gtag("event", "page_view", {
185
+ page_location: window.location.pathname + location.search,
186
+ });
194
187
  }
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
- });
188
+ const paramName = 'search';
189
+ if (new URLSearchParams(window.location.search).has(paramName)) {
190
+ const additionalData = {
191
+ url: "{{site.url}}",
192
+ range: "{{page.blanktilerange}}"
193
+ }
194
+ var loadJs = document.querySelector(".loaded-js");
195
+ if (loadJs == null) {
196
+ loadResource("/assets/css/wordfinder-result.css", additionalData, true, "text/css")
197
+ .then((data) => {
198
+ console.log("CSS loaded:", data);
199
+ })
200
+ .then(() => {
201
+ // Load the JavaScript file after the CSS file has loaded
202
+ loadResource("/assets/js/wordfinder.js", additionalData, true, "text/javascript")
203
+ .then((data) => {
204
+ console.log("JavaScript loaded:", data);
205
+ getData(txtBox.value.toLowerCase());
206
+ })
207
+ .catch((error) => {
208
+ console.error("Error loading JavaScript:", error);
209
+ });
210
+ })
211
+ .catch((error) => {
212
+ console.error("Error loading CSS:", error);
213
+ });
214
+ }
215
215
  }
216
+ } else {
217
+ console.log("Please Enter Valid Letters.");
216
218
  }
217
219
  });
218
220
  // Now you can use the loadScript function with additional data
@@ -106,14 +106,14 @@ function appendData(xyzsortValue, data) {
106
106
  points += ScrabbleLetterScore[word[i]] || 0; // for unknown characters
107
107
  }
108
108
  return `
109
- <a class="anchor__style" title="Lookup ${item.replace(/<\/?[^>]+>/gi, '')} in Dictionary" target="_blank"
110
- href="/word-meaning?search=${item.replace(/<\/?[^>]+>/gi, '')}">
111
- <li class="list_word">
112
- ${item}
113
- <span class="points" value="${points}" style="position:relative; top:4px; font-size:12px">${points}</span>
114
- </li>
115
- </a>
116
- `});
109
+ <a href="/word-meaning?search=${item.replace(/<\/?[^>]+>/gi, '')}" class="anchor__style" title="Lookup ${item.replace(/<\/?[^>]+>/gi, '')} in Dictionary" target="_blank">
110
+ <li class="list_word">
111
+ ${item}
112
+ <span class="points" value="${points}" style="position:relative; top:4px; font-size:12px">${points}</span>
113
+ </li>
114
+ </a>
115
+ `
116
+ });
117
117
 
118
118
  mainContent.innerHTML += `
119
119
  <div class="allGroupWords wordlistContainer" id="alpha_${i}">
@@ -384,7 +384,7 @@ formElement.addEventListener("submit", function (e) {
384
384
  page_location: window.location.pathname + location.search,
385
385
  });
386
386
  }
387
-
387
+
388
388
 
389
389
  const paramName = 'search';
390
390
  if (new URLSearchParams(window.location.search).has(paramName)) {
@@ -88,7 +88,7 @@ const loadResource = (FILE_URL, async = true, type = "text/javascript") => {
88
88
 
89
89
  resourceEle.type = type;
90
90
  resourceEle.async = async;
91
-
91
+
92
92
 
93
93
 
94
94
  resourceEle.addEventListener("load", () => {
@@ -113,81 +113,84 @@ const formElement = document.querySelector("#form");
113
113
  formElement.addEventListener("submit", function (e) {
114
114
  e.preventDefault();
115
115
 
116
- document.querySelector(".fillterWrapper").classList.add("hide")
117
- let selectedDictionary = document.querySelector(".select_dropDown2").value;
118
- if (history.pushState) {
119
- var newurl =
120
- window.location.protocol +
121
- "//" +
122
- window.location.host +
123
- window.location.pathname +
124
- "?" +
125
- "search" +
126
- "=" +
127
- txtBox.value.toLowerCase() +
128
- "&" +
129
- "dictionary" +
130
- "=" +
131
- selectedDictionary +
132
- "&" +
133
- "prefix" +
134
- "=" +
135
- startsWith.value +
136
- "&" +
137
- "contains" +
138
- "=" +
139
- mustInclude.value +
140
- "&" +
141
- "suffix" +
142
- "=" +
143
- endsWith.value +
144
- "&" +
145
- "exclude" +
146
- "=" +
147
- exculdeWith.value +
148
- "&" +
149
- "include" +
150
- "=" +
151
- inculdeWith.value +
152
- "&" +
153
- "length" +
154
- "=" +
155
- wordLength.value;
156
- window.history.pushState({ path: newurl }, "", newurl);
157
-
158
- const params = new URLSearchParams(window.location.search);
159
- serachValue = params.get("search");
160
- prefixValue = params.get("prefix");
161
- containsValue = params.get("contains");
162
- suffixValue = params.get("suffix");
163
- exculdeValue = params.get("exclude");
164
- includeValue = params.get("include");
165
- lengthValue = params.get("length");
166
- dictonary = params.get("dictionary");
167
-
168
- gtag("event", "page_view", {
169
- page_location: window.location.pathname + location.search,
170
- });
171
- }
172
-
173
- const paramName = 'search';
174
- if (new URLSearchParams(window.location.search).has(paramName)) {
175
-
176
- loadResource("/assets/css/wordfinder-result.css", true, "text/css").then((data) => {
177
- console.log("CSS loaded:", data);
178
- }).then(() => {
179
- // Load the JavaScript file after the CSS file has loaded
180
- loadResource("/assets/js/xletter-result.js", true, "text/javascript").then((data) => {
116
+ if (txtBox.value != "" || startsWith.value != "" || endsWith.value != "" || mustInclude.value != "" || exculdeWith.value != "" || inculdeWith.value != "" || wordLength.value != "") {
117
+ document.querySelector(".fillterWrapper").classList.add("hide")
118
+ let selectedDictionary = document.querySelector(".select_dropDown2").value;
119
+ if (history.pushState) {
120
+ var newurl =
121
+ window.location.protocol +
122
+ "//" +
123
+ window.location.host +
124
+ window.location.pathname +
125
+ "?" +
126
+ "search" +
127
+ "=" +
128
+ txtBox.value.toLowerCase() +
129
+ "&" +
130
+ "dictionary" +
131
+ "=" +
132
+ selectedDictionary +
133
+ "&" +
134
+ "prefix" +
135
+ "=" +
136
+ startsWith.value +
137
+ "&" +
138
+ "contains" +
139
+ "=" +
140
+ mustInclude.value +
141
+ "&" +
142
+ "suffix" +
143
+ "=" +
144
+ endsWith.value +
145
+ "&" +
146
+ "exclude" +
147
+ "=" +
148
+ exculdeWith.value +
149
+ "&" +
150
+ "include" +
151
+ "=" +
152
+ inculdeWith.value +
153
+ "&" +
154
+ "length" +
155
+ "=" +
156
+ wordLength.value;
157
+ window.history.pushState({ path: newurl }, "", newurl);
158
+
159
+ const params = new URLSearchParams(window.location.search);
160
+ serachValue = params.get("search");
161
+ prefixValue = params.get("prefix");
162
+ containsValue = params.get("contains");
163
+ suffixValue = params.get("suffix");
164
+ exculdeValue = params.get("exclude");
165
+ includeValue = params.get("include");
166
+ lengthValue = params.get("length");
167
+ dictonary = params.get("dictionary");
168
+
169
+ gtag("event", "page_view", {
170
+ page_location: window.location.pathname + location.search,
171
+ });
172
+ }
173
+ const paramName = 'search';
174
+ if (new URLSearchParams(window.location.search).has(paramName)) {
175
+
176
+ loadResource("/assets/css/wordfinder-result.css", true, "text/css").then((data) => {
177
+ console.log("CSS loaded:", data);
178
+ }).then(() => {
179
+ // Load the JavaScript file after the CSS file has loaded
180
+ loadResource("/assets/js/xletter-result.js", true, "text/javascript").then((data) => {
181
181
  console.log("JavaScript loaded:", data);
182
182
  getData(txtBox.value.toLowerCase());
183
183
  })
184
+ .catch((error) => {
185
+ console.error("Error loading JavaScript:", error);
186
+ });
187
+ })
184
188
  .catch((error) => {
185
- console.error("Error loading JavaScript:", error);
189
+ console.error("Error loading CSS:", error);
186
190
  });
187
- })
188
- .catch((error) => {
189
- console.error("Error loading CSS:", error);
190
- });
191
+ }
192
+ } else {
193
+ console.log("Please Enter Valid Letters.");
191
194
  }
192
195
  });
193
196
 
@@ -196,24 +199,24 @@ function checkQueryParam() {
196
199
  const urlParams = new URLSearchParams(window.location.search);
197
200
  const paramName = 'search';
198
201
  if (urlParams.has(paramName)) {
199
- loadResource("/assets/css/wordfinder-result.css", true, "text/css")
200
- .then((data) => {
201
- console.log("CSS loaded:", data);
202
- })
203
- .then(() => {
204
- // Load the JavaScript file after the CSS file has loaded
205
- loadResource("/assets/js/xletter-result.js", true, "text/javascript")
206
- .then((data) => {
207
- console.log("JavaScript loaded:", data);
208
- getData(txtBox.value.toLowerCase());
209
- })
210
- .catch((error) => {
211
- console.error("Error loading JavaScript:", error);
212
- });
213
- })
214
- .catch((error) => {
215
- console.error("Error loading CSS:", error);
216
- });
202
+ loadResource("/assets/css/wordfinder-result.css", true, "text/css")
203
+ .then((data) => {
204
+ console.log("CSS loaded:", data);
205
+ })
206
+ .then(() => {
207
+ // Load the JavaScript file after the CSS file has loaded
208
+ loadResource("/assets/js/xletter-result.js", true, "text/javascript")
209
+ .then((data) => {
210
+ console.log("JavaScript loaded:", data);
211
+ getData(txtBox.value.toLowerCase());
212
+ })
213
+ .catch((error) => {
214
+ console.error("Error loading JavaScript:", error);
215
+ });
216
+ })
217
+ .catch((error) => {
218
+ console.error("Error loading CSS:", error);
219
+ });
217
220
  }
218
221
  }
219
222
  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.6.9
4
+ version: 2.7.1
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-03-22 00:00:00.000000000 Z
11
+ date: 2024-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -381,6 +381,7 @@ files:
381
381
  - assets/js/leftNav.js
382
382
  - assets/js/multiple-word-anagram-solver.js
383
383
  - assets/js/noRefreshAds.js
384
+ - assets/js/other-lang-wordScrabble-home.js
384
385
  - assets/js/other-lang-wordScrabble.js
385
386
  - assets/js/repeat-letters.js
386
387
  - assets/js/resultPage.js