word-games-theme 1.6.2 → 1.6.3

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: 9fe0446293325cbf8e31dac6adc03a4be865ad5f3caea4ed23493b87532a7163
4
- data.tar.gz: aea509333333fe033149a2a79074d1c60496dc9e707c52190276675403a9e2b5
3
+ metadata.gz: 3c4ff3cb4b9bea3285034f470312b7139bccda38792632a5c40a9cff555f0b97
4
+ data.tar.gz: 4c377dfddef83d6d6a8de2af8dfab51db3fc2c4dc0e6b4bbc70313071386d043
5
5
  SHA512:
6
- metadata.gz: 8eb2b439467c88cefcde1000063fa0c5fb415ef1979f0f9533a429bce606aeea6aa99b1defba419693a1796bcf20ccb7fec99ea8077786da27d5e0ba218201b1
7
- data.tar.gz: 9588d265e2ede55620d38e323e08c0e66ff9312b0bad18a563f418d070870a1f859526169ecbef650619a81a18fa2a7ec12242bf3d8a5d48c9fb72dd89ff4de2
6
+ metadata.gz: 84e7d472745c15a6a2888848133fe3e7a83d86ab3e434bcd1009dd5b57f8207b334a488c7642ae6d701469f23713983ec123c69d931b89e4c33db2065f7f8b02
7
+ data.tar.gz: 98772bc88e6226854a7d4097be50c1b92c0f79340ebdb41a54113334c42cc83d88c92e95d7be4e6becbe36952df33d03a12808faad5c22b7703df3b394c5d0e2
@@ -0,0 +1,101 @@
1
+ {
2
+ "title": "Word finder with repeating letters- Find the top scoring words in just a few clicks",
3
+ "h1": "Get a head start on your opponent with our free online word finder with repeating letters",
4
+ "h2": "Find all the valid words with repeating letters",
5
+ "meta": "Have trouble forming words for puzzle games? Use this game changer word finder with repeating letters tool to easily generate high scoring words. This tool will help you score more points and make you win easily.",
6
+ "featureNo": "02",
7
+ "feature_title": "Features",
8
+ "blogNo": "03",
9
+ "blog_title": "Blog",
10
+ "FaqNo": "04",
11
+ "Faq_title": "FAQ",
12
+ "aboutNo": "05",
13
+ "about_title": "About",
14
+ "featureList": [
15
+ {
16
+ "feature_heading": "Heard of a free online word finder with repeating letters?",
17
+ "feature_text": "Are you acquainted with a free online word finder with repeating letters? It’s simply no longer something that you hear about every day!",
18
+ "fa_class": ""
19
+ },
20
+ {
21
+ "feature_heading": "But you'd surely know it if you are huge fan of word games",
22
+ "feature_text": "However, if you’re hooked on word games and particularly love word puzzles, you’ll understand a free online word finder with repeating letters as an essential invention for figuring out words and repeated letters.",
23
+ "fa_class": "../assets/images/star.svg"
24
+ },
25
+ {
26
+ "feature_heading": "Free online word finder with repeating letters in SIMPLE TERMS",
27
+ "feature_text": "In simple words, a free online word finder with repeating letters is a tool that finds words that contain repeated letters very promptly.",
28
+ "fa_class": "../assets/images/star.svg"
29
+ },
30
+ {
31
+ "feature_heading": "How to use this free online word finder with repeating letters?",
32
+ "feature_text": "Word finders with repeating letters can be used by visiting the URL, then entering any word in the search bar, you will get all the possible results ",
33
+ "fa_class": "../assets/images/star.svg"
34
+ },
35
+ {
36
+ "feature_heading": "How does this free online word finder with repeating letters work?",
37
+ "feature_text": "It's extremely simple! Just enter the meaningful word and there you get the possible results of the same. For example: CONGRATULATIONS turns into- COAGULATIONS, CONSULTATION, CONTINUATORS, GASTRULATION, etc.\t",
38
+ "fa_class": "../assets/images/star.svg"
39
+ }
40
+ ],
41
+ "faqList": [
42
+ {
43
+ "Question": "How can I use the Advanced filter option?",
44
+ "Answer": "To use the advanced filter option, click on Advanced Filters. Fill in your options like word Prefix, what letters or words it Must Include, what it Contains, Ending word, the Suffix, the length of the word and hit on apply."
45
+ },
46
+ {
47
+ "Question": " Can I sort the search results?",
48
+ "Answer": "Yes, once the results are displayed, as per the number of results generated, the sort function will appear on the screen."
49
+ },
50
+ {
51
+ "Question": "What are the sorting options available?",
52
+ "Answer": "We provide multiple sorting options. You can sort the search results from 12 letters, 13 letters, 2 letters and more."
53
+ },
54
+ {
55
+ "Question": "Can I know my word score in a word game?",
56
+ "Answer": "Yes, absolutely. Our website not only provides you with all the possible word formations from the words entered by you but also displays the points that you will score if you use this word in a game."
57
+ },
58
+ {
59
+ "Question": "What is a free online word finder with repeating letters?",
60
+ "Answer": "The tool finds all the possible combinations of words that can be formed with words that make sense. It shows the results of all the words that you can make using the word entered by you."
61
+ },
62
+ {
63
+ "Question": "Can I use this free online word finder with repeating letters on my phone?",
64
+ "Answer": "Yes, our free online word finder with repeating letters is mobile friendly. So you can use it on your laptop, tab or smartphone also."
65
+ },
66
+ {
67
+ "Question": "Can we customize the needs to get words of my choice?",
68
+ "Answer": "You can apply the filters on our free online word finder with repeating letters to get tailored words."
69
+ },
70
+ {
71
+ "Question": "Can I get the cheat sheet for this free online word finder with repeating letters?",
72
+ "Answer": "Yes, the cheat sheet for the free online word finder with repeating letters is available. It also supports multiple dictionaries."
73
+ },
74
+ {
75
+ "Question": "What are some examples of a free online word finder with repeating letters?",
76
+ "Answer": "Some of the solved words are MANGO becomes AMONG and MANGO, TABLE becomes BLEAT, and BLATE."
77
+ },
78
+ {
79
+ "Question": "How can I get better at building words with a free online word finder with repeating letters? What are some tips and tricks that would help me in the game?",
80
+ "Answer": "Solving blanks and words becomes easy when you have general knowledge about the English language. Look for such words and start by pairing them together. You can also focus on suffixes like ING and RE that will help you pair those letters together."
81
+ },
82
+ {
83
+ "Question": "When will I need to use a free online word finder with repeating letters?",
84
+ "Answer": "You can use our free online word finder with repeating letters when playing word games with friends. You can get access to our different dictionaries and get your hands on all the different words that can be formed with that word."
85
+ },
86
+ {
87
+ "Question": "What are some examples of free online word finders with repeating letters?",
88
+ "Answer": "Free online word finders with repeating letters look like this, CONGRATULATIONS become STRANGULATION, TRANSLOCATING, TRANSLOCATION, in the 13 letter words category. "
89
+ }
90
+ ],
91
+ "aboutList": [
92
+ {
93
+ "aboutText": "Lorem ipsum dolor sit amet consectetur adipisicing elit. Enim odio sapiente unde voluptatibus, excepturi saepe quisquam veniam architecto delectus dolor eos dolorem id itaque necessitatibus laborum cupiditate asperiores officia? Deleniti!"
94
+ },
95
+ {
96
+ "aboutText": "Lorem ipsum dolor sit amet consectetur adipisicing elit. Enim odio sapiente unde voluptatibus, excepturi saepe quisquam veniam architecto delectus dolor eos dolorem id itaque necessitatibus laborum cupiditate asperiores officia? Deleniti!"
97
+ }
98
+ ],
99
+
100
+ "jsfilepaths": ["/assets/js/resultPage.js", "/assets/js/repeat-letters.js"]
101
+ }
@@ -0,0 +1,323 @@
1
+ {% assign file = page.fileName %} {% assign lang = page.lang %} {% assign
2
+ dataToShow = site.data.[page.folderName][lang][file] %} {%- assign CustomColor =
3
+ site.data.theme.colors -%}
4
+
5
+ <div class="pageHeaderBg">
6
+ <div class="container">
7
+ <!-- <div class="pageHeading text-center" style="margin: 22px 0px">
8
+ <h1 class="heading pb-0 mb-0">{{dataToShow.h1}}</h1>
9
+ <br />
10
+ {%- if dataToShow.h2 != "" -%}
11
+ <h2>{{dataToShow.h2}}</h2>
12
+ {%- endif -%} -->
13
+ <!-- </div> -->
14
+ </div>
15
+ <div class="container-fluid" id="containerWd">
16
+ <div class="serachSection">
17
+ <div class="position-relative serachBox">
18
+ <form action="" id="form" method="GET">
19
+ <div style="position: relative">
20
+ <input
21
+ style="border-radius: {{CustomColor.inputFieldBorder}}"
22
+ type="text"
23
+ placeholder="Enter up to 15 letters?"
24
+ class="txtBox"
25
+ value=""
26
+ name="search"
27
+ maxlength="15"
28
+ required
29
+ autocomplete="off"
30
+ />
31
+ <span class="focus-border">
32
+ <i></i>
33
+ </span>
34
+
35
+ <div class="letter-close-button-commonPage">
36
+ <i class="ltr-cls-btn bi bi-x-circle-fill"></i>
37
+ </div>
38
+ </div>
39
+ <input
40
+ style="background-color: {{CustomColor.inputButtonBg}};"
41
+ type="submit"
42
+ class="serachBtn"
43
+ id="serach"
44
+ value=""
45
+ />
46
+
47
+ <div class="dictonaryDropdown">
48
+ <select
49
+ class="form-select select_dropDown2"
50
+ name="dictionary"
51
+ aria-label="Default select example"
52
+ >
53
+ <option value="Dictionary">Dictionary</option>
54
+ <option value="twl06">TWL06 (US, Canada, Thailand)</option>
55
+ <option selected value="sowpods">SOWPODS (Uk and Others)</option>
56
+ <option value="wwf">Enable (Words With Friends)</option>
57
+ </select>
58
+ </div>
59
+
60
+ <div
61
+ class="tab_link_wrapper"
62
+ style="position: relative; display: none"
63
+ >
64
+ <div id="tab-scroll" class="tab-scroll flex-row">
65
+ <input
66
+ type="button"
67
+ name=""
68
+ id="prev"
69
+ class="prev tabsBg noOutline cursorPointer"
70
+ value=" "
71
+ style="display: none"
72
+ />
73
+ <div
74
+ id="tab-container"
75
+ class="search-container tab_container flex-row"
76
+ ></div>
77
+ <input
78
+ type="button"
79
+ name=""
80
+ id="next"
81
+ class="next tabsBg noOutline cursorPointer"
82
+ value=" "
83
+ style="display: none"
84
+ />
85
+ </div>
86
+ </div>
87
+ <div
88
+ class="wrapper_dropDown d-flex justify-content-end"
89
+ style="gap: 15px"
90
+ >
91
+ <div
92
+ class="Advancedbtn"
93
+ style="position: relative; margin-top: 10px"
94
+ onclick="myFunction"
95
+ >
96
+ <span class="filter_count" style="display: none"></span>
97
+ <input
98
+ type="button"
99
+ value="Advanced Filter"
100
+ class="filterButton"
101
+ />
102
+ <div class="angle-arrow"></div>
103
+ </div>
104
+
105
+ <div id="sort-select" style="display: none; margin-top: 10px">
106
+ <select class="form-select sort-select" id="select_dropDown">
107
+ <option selected="true" hidden id="alpha" value="alpha">
108
+ Sort by
109
+ </option>
110
+ <option id="alpha" value="alpha">A-Z</option>
111
+ <option id="alpha" value="alpha">Z-A</option>
112
+ <option id="alpha" value="alpha">Points</option>
113
+ </select>
114
+ </div>
115
+ </div>
116
+
117
+ <div id="fillterWrapper" class="fillterWrapper hide">
118
+ <div class="text-right times" style="cursor: pointer">
119
+ <img
120
+ loading="lazy"
121
+ src="/assets/images/window-close.png"
122
+ alt="window-close-icon"
123
+ height="12px"
124
+ width="12px"
125
+ />
126
+ </div>
127
+ <div class="startsWith">
128
+ <label
129
+ data-toggle="tooltip"
130
+ data-placement="top"
131
+ title="Filter for words that starts with these letters"
132
+ for="startsWith"
133
+ >Starts With</label
134
+ >
135
+ <br />
136
+ <input
137
+ type="text"
138
+ id="startsWith"
139
+ placeholder="Prefix"
140
+ value=""
141
+ name="prefix"
142
+ />
143
+ </div>
144
+ <div class="mustInclude">
145
+ <label
146
+ for="mustInclude"
147
+ data-toggle="tooltip"
148
+ data-placement="top"
149
+ title=" Words that contain letters in this order(ab)"
150
+ >Must Contains
151
+ </label>
152
+ <br />
153
+ <input
154
+ type="text"
155
+ id="mustInclude"
156
+ placeholder="Contains"
157
+ name="contains"
158
+ />
159
+ </div>
160
+ <div class="endsWith">
161
+ <label
162
+ for="endsWith"
163
+ data-toggle="tooltip"
164
+ data-placement="top"
165
+ title="Filter for words that ends with these letters"
166
+ >End With</label
167
+ >
168
+ <br />
169
+ <input
170
+ type="text"
171
+ id="endsWith"
172
+ placeholder="Suffix"
173
+ name="suffix"
174
+ />
175
+ </div>
176
+ <div class="exculdeWith">
177
+ <label
178
+ data-toggle="tooltip"
179
+ data-placement="top"
180
+ title="Only words that not contain the letters you enter here"
181
+ for="exculdeWith"
182
+ >Exculde</label
183
+ >
184
+ <br />
185
+ <input
186
+ type="text"
187
+ id="exculdeWith"
188
+ placeholder="Exculde"
189
+ value=""
190
+ name="exculde"
191
+ />
192
+ </div>
193
+ <div class="inculdeWith">
194
+ <label
195
+ data-toggle="tooltip"
196
+ data-placement="top"
197
+ title="Only words that contain the letters you enter here"
198
+ for="inculdeWith"
199
+ >Include</label
200
+ >
201
+ <br />
202
+ <input
203
+ type="text"
204
+ id="inculdeWith"
205
+ placeholder="Include"
206
+ value=""
207
+ name="include"
208
+ />
209
+ </div>
210
+ <div class="wordLength">
211
+ <label
212
+ data-toggle="tooltip"
213
+ data-placement="top"
214
+ title="Filter for words with this length"
215
+ for="wordLength"
216
+ >Word Length
217
+ </label>
218
+ <br />
219
+ <input
220
+ type="text"
221
+ id="wordLength"
222
+ placeholder="Length"
223
+ name="length"
224
+ />
225
+ <div style="margin-top: 1.2rem; gap: 5px" class="d-flex w-100">
226
+ <input
227
+ type="button"
228
+ value="Clear"
229
+ class="clearFilter btn-info text-white"
230
+ style="background-color: {{CustomColor.inputButtonBg}};"
231
+ />
232
+ <input
233
+ type="submit"
234
+ value="Apply"
235
+ class="btn-info text-white"
236
+ style="background-color: {{CustomColor.inputButtonBg}};"
237
+ />
238
+ </div>
239
+ </div>
240
+ </div>
241
+ </form>
242
+ </div>
243
+ </div>
244
+ </div>
245
+ </div>
246
+
247
+ <div class="container" id="containerWd">
248
+ <div class="row pad">
249
+ <div class="col-md-12">
250
+ <div class="filters d-flex justify-content-between align-items-center">
251
+ <div class="wordCount"></div>
252
+
253
+ <div class="filterSortedIcons">
254
+ <div
255
+ class="filter-icon"
256
+ onclick="myFunction()"
257
+ data-toggle="tooltip"
258
+ data-placement="top"
259
+ title="Filter"
260
+ >
261
+ <i class="bi bi-filter"></i>
262
+ </div>
263
+ <div
264
+ class="sortup-icon"
265
+ data-toggle="tooltip"
266
+ data-placement="top"
267
+ title="Sort"
268
+ >
269
+ <i class="bi bi-sort-up"></i>
270
+ </div>
271
+ </div>
272
+ </div>
273
+
274
+ {%- if page.noAdsRefresh -%}
275
+ <div class="main-loader"></div>
276
+ <div class="main" data-value="null"></div>
277
+ {%- else -%}
278
+ <div class="main"></div>
279
+ {%- endif -%}
280
+
281
+ <div class="errorMsg"></div>
282
+ </div>
283
+ </div>
284
+ </div>
285
+ <link
286
+ rel="stylesheet"
287
+ href="{{ '/assets/css/advancedFilter.css' | relative_url }}"
288
+ />
289
+ <script>
290
+ const clearFilter = document.querySelector(".clearFilter");
291
+
292
+ clearFilter.addEventListener("click", () => {
293
+ startsWith.value = "";
294
+ mustInclude.value = "";
295
+ endsWith.value = "";
296
+ exculdeWith.value = "";
297
+ inculdeWith.value = "";
298
+ wordLength.value = "";
299
+ });
300
+
301
+ const advancedFilter = document.querySelector(".Advancedbtn");
302
+ const fillterWrapper = document.querySelector(".fillterWrapper");
303
+ advancedFilter.addEventListener("click", () => {
304
+ fillterWrapper.classList.toggle("actives");
305
+ fillterWrapper.classList.remove("hide");
306
+ });
307
+
308
+ // document.addEventListener('click', (event) => {
309
+ // const withinBoundaries = event.composedPath().includes(advancedFilter)
310
+ // if (!withinBoundaries) {
311
+ // closeModal()
312
+ // }
313
+ // })
314
+ function closeModal() {
315
+ fillterWrapper.classList.remove("actives");
316
+ fillterWrapper.classList.add("hide");
317
+ }
318
+
319
+ const close = document.querySelector(".times");
320
+ close.addEventListener("click", () => {
321
+ closeModal();
322
+ });
323
+ </script>
@@ -0,0 +1,798 @@
1
+ const getScript = document.currentScript;
2
+ let form = document.querySelector("#form");
3
+ let wordCount = document.querySelector(".wordCount");
4
+ let main = document.querySelector(".main");
5
+ let loader = document.querySelector(".main-loader");
6
+ let errorMsg = document.querySelector(".errorMsg");
7
+ let script = document.currentScript;
8
+ let txtBox = document.querySelector(".txtBox");
9
+ const permaLink = getScript.dataset.permalink;
10
+ const sortup = document.querySelector(".sortup-icon");
11
+ let applyBtn = document.querySelector(".btn-info");
12
+
13
+ let sortingFilter = document.querySelector("#select_dropDown");
14
+
15
+ // grabbing advanced filter elements.
16
+ let tick;
17
+ let startsWith = document.getElementById("startsWith");
18
+ let mustInclude = document.getElementById("mustInclude");
19
+ let endsWith = document.getElementById("endsWith");
20
+ let exculdeWith = document.getElementById("exculdeWith");
21
+ let includeWith = document.getElementById("inculdeWith");
22
+ let wordLength = document.getElementById("wordLength");
23
+ let btn = document.querySelector(".serachBtn");
24
+ let tab_container = document.querySelector(".tab_container");
25
+ let dictionary = document.querySelector(".select_dropDown2");
26
+ var sortValue;
27
+ var sortBool = false;
28
+ let sortSelect = document.querySelector("#sort-select");
29
+ let serachValue = txtBox.value;
30
+ let prefixValue = startsWith.value;
31
+ let containsValue = mustInclude.value;
32
+ let suffixValue = endsWith.value;
33
+ let exculdeValue = exculdeWith.value;
34
+ let includeValue = includeWith.value;
35
+ let lengthValue = wordLength.value;
36
+ let dictonary = document.querySelector(".select_dropDown2").value;
37
+ let letterCloseButton = document.querySelector(
38
+ ".letter-close-button-commonPage"
39
+ );
40
+ let ok = true;
41
+ const siteUrl = window.location.href;
42
+ let queryParams = [
43
+ {
44
+ name: "search",
45
+ values: txtBox,
46
+ },
47
+ {
48
+ name: "prefix",
49
+ values: startsWith,
50
+ },
51
+ {
52
+ name: "contains",
53
+ values: mustInclude,
54
+ },
55
+ {
56
+ name: "suffix",
57
+ values: endsWith,
58
+ },
59
+ {
60
+ name: "exclude",
61
+ values: exculdeWith,
62
+ },
63
+ {
64
+ name: "include",
65
+ values: includeWith,
66
+ },
67
+ {
68
+ name: "length",
69
+ values: wordLength,
70
+ },
71
+ {
72
+ name: "length",
73
+ values: wordLength,
74
+ },
75
+ {
76
+ name: "dictionary",
77
+ values: dictionary,
78
+ },
79
+ ];
80
+
81
+ if (serachValue) {
82
+ letterCloseButton.classList.add("ltr-cls-btn-commonPage");
83
+ }
84
+ letterCloseButton.addEventListener("click", () => {
85
+ txtBox.value = "";
86
+ letterCloseButton.classList.remove("ltr-cls-btn-commonPage");
87
+ });
88
+
89
+ function mobileScrollTop(x) {
90
+ if (x.matches) {
91
+ console.log(x.matches);
92
+ txtBox.addEventListener("click", () => {
93
+ document.documentElement.scrollTop = 350;
94
+ setTimeout(() => {
95
+ document.documentElement.scrollTop = 350;
96
+ }, 300);
97
+ });
98
+ } else {
99
+ console.log("false");
100
+ }
101
+ }
102
+ var x = window.matchMedia("(max-width: 768px)");
103
+ mobileScrollTop(x);
104
+ x.addListener(mobileScrollTop);
105
+
106
+ let rangeOfBlankTile = script.dataset.range;
107
+ let quesMark = "?";
108
+ const getDiff = (text1, text2) => {
109
+ var diffRange = [];
110
+ var currentRange = undefined;
111
+ for (var i = 0; i < text1.length; i++) {
112
+ if (text1[i] != text2[i]) {
113
+ if (currentRange == undefined) {
114
+ currentRange = [i];
115
+ }
116
+ }
117
+ if (currentRange != undefined && text1[i] == text2[i]) {
118
+ currentRange.push(i);
119
+ diffRange.push(currentRange);
120
+ currentRange = undefined;
121
+ }
122
+ }
123
+ if (currentRange != undefined) {
124
+ currentRange.push(i);
125
+ diffRange.push(currentRange);
126
+ }
127
+ return diffRange;
128
+ };
129
+
130
+ // getWords define...
131
+ const getData = async (serachValue) => {
132
+ try {
133
+ errorMsg.innerHTML = "";
134
+ wordCount.innerHTML = "";
135
+ let selectedDictionary = document.querySelector(".select_dropDown2").value;
136
+ main.innerHTML = `<div class="loader">
137
+ <img src='/assets/images/loading.gif'>
138
+ <div style="font-weight:900;font-size:14px" >Finding words - Powered by ${siteUrl.replace(
139
+ /^https?:\/\//,
140
+ ""
141
+ )}</div>
142
+ </div>`;
143
+
144
+ const response = await fetch(
145
+ `http://127.0.0.1:9000/getRepeatWords?name=${serachValue}&selecteddictionary=${selectedDictionary}`
146
+ );
147
+ const data = await response.json();
148
+ main.innerHTML = "";
149
+ getWords(data);
150
+ //getWords calling...
151
+ } catch (error) {
152
+ console.log(error);
153
+ }
154
+ };
155
+
156
+ //getData calling...
157
+ // if (lengthValue === "1") {
158
+ // errorMsg.innerHTML = "words length should be more than 1";
159
+ // } else {
160
+ // getData(serachValue.toLowerCase());
161
+ function logSubmit(e) {
162
+ e.preventDefault();
163
+ resultPage2(queryParams);
164
+ const scrollingElement = document.scrollingElement || document.body;
165
+ scrollingElement.scroll({ top: 0, behavior: "smooth" });
166
+ if (rangeOfBlankTile) {
167
+ if (!txtBox.value.includes("?")) {
168
+ txtBox.value = txtBox.value + quesMark.repeat(rangeOfBlankTile); //
169
+ }
170
+ }
171
+ getData(txtBox.value.toLowerCase());
172
+ addFilterCount();
173
+ }
174
+
175
+ dictionary.addEventListener("change", (e) => {
176
+ logSubmit(e);
177
+ });
178
+ // }
179
+
180
+ applyBtn.addEventListener("submit", logSubmit);
181
+ form.addEventListener("submit", logSubmit);
182
+
183
+ // getWords function define...
184
+ function getWords(data) {
185
+ main.innerHTML = "";
186
+ tab_container.innerHTML = "";
187
+
188
+ data = filterRepeatedWords(txtBox.value, data);
189
+ data = sortWords(data);
190
+ if (data.length === 0) {
191
+ hideResultPageComponents();
192
+ errorMsg.innerHTML = "no words found";
193
+ wordCount.innerHTML = `<strong>Found 0 words with letters ${serachValue.split(
194
+ ""
195
+ )}</strong>`;
196
+ } else {
197
+ showResultPageComponents();
198
+ let newWordsLength = 0;
199
+ let dataArr = [];
200
+ let points = 0;
201
+
202
+ for (let i = 15; i >= 0; i--) {
203
+ let newdata = data.filter((item) => item.length === i);
204
+ let prefixValue = startsWith.value;
205
+ let containsValue = mustInclude.value;
206
+ let suffixValue = endsWith.value;
207
+ let exculdeValue = exculdeWith.value;
208
+ let includeValue = includeWith.value;
209
+ let lengthValue = wordLength.value;
210
+
211
+ if (startsWith.value) {
212
+ newdata = newdata.filter((item2) =>
213
+ item2.startsWith(prefixValue.toLowerCase())
214
+ );
215
+ startsWith.classList.add("filter_val", "tick");
216
+ // startsWith.value =
217
+ } else {
218
+ startsWith.classList.remove("filter_val", "tick");
219
+ }
220
+ if (mustInclude.value) {
221
+ newdata = newdata.filter((item) =>
222
+ item.includes(containsValue.toLowerCase())
223
+ );
224
+ mustInclude.classList.add("filter_val", "tick");
225
+ // mustInclude.value = containsValue;
226
+ } else {
227
+ mustInclude.classList.remove("filter_val", "tick");
228
+ }
229
+ if (endsWith.value) {
230
+ newdata = newdata.filter((item) =>
231
+ item.endsWith(suffixValue.toLowerCase())
232
+ );
233
+ endsWith.classList.add("filter_val", "tick");
234
+ // endsWith.value = suffixValue;
235
+ } else {
236
+ endsWith.classList.remove("filter_val", "tick");
237
+ }
238
+ if (exculdeWith.value) {
239
+ let excludeData = [];
240
+ newdata.map((item) => {
241
+ let check = false;
242
+ for (let e = 0; e < exculdeValue.length; e++) {
243
+ const element = exculdeValue[e].toLowerCase();
244
+ if (item.includes(element)) {
245
+ check = true;
246
+ break;
247
+ } else {
248
+ check = false;
249
+ }
250
+ }
251
+ if (check === false) {
252
+ excludeData.push(item);
253
+ }
254
+ newdata = excludeData;
255
+ });
256
+ exculdeWith.classList.add("filter_val", "tick");
257
+ // exculdeWith.value = exculdeValue;
258
+ } else {
259
+ exculdeWith.classList.remove("filter_val", "tick");
260
+ }
261
+ if (includeWith.value) {
262
+ let data = [];
263
+ newdata.map((item) => {
264
+ let check = false;
265
+ for (let e = 0; e < includeValue.length; e++) {
266
+ const element = includeValue[e].toLowerCase();
267
+ if (!item.includes(element)) {
268
+ check = true;
269
+ break;
270
+ } else {
271
+ check = false;
272
+ }
273
+ }
274
+ if (check === false) {
275
+ data.push(item);
276
+ }
277
+ });
278
+ includeWith.classList.add("filter_val", "tick");
279
+ includeWith.value = includeValue;
280
+ newdata = data;
281
+ } else {
282
+ includeWith.classList.remove("filter_val", "tick");
283
+ }
284
+ if (wordLength.value) {
285
+ newdata = newdata.filter((item) => item.length == wordLength.value);
286
+ wordLength.classList.add("filter_val", "tick");
287
+ wordLength.value = lengthValue;
288
+ } else {
289
+ wordLength.classList.remove("filter_val", "tick");
290
+ }
291
+ if (newdata.length == 0) {
292
+ main.innerHTML += "";
293
+ } else {
294
+ newWordsLength += newdata.length;
295
+ const result = newdata.map((item) => {
296
+ // var text1 = serachValue.replace("?", "");
297
+ // var text2 = item;
298
+ // var text3 = item;
299
+ // let chars = text1.split("");
300
+
301
+ let indexs = [];
302
+ // chars.map((i) => {
303
+ // let findIndexes = findIndex(text3, i);
304
+ // if (findIndexes.length > 0) {
305
+ // text3 = text3.split("");
306
+ // text3[findIndexes] = "$";
307
+ // text3 = text3.join("");
308
+
309
+ // indexs = [...indexs, ...findIndexes];
310
+ // }
311
+ // });
312
+ // let itemHtml = "";
313
+ // text2.split("").map((itemValue, index) => {
314
+ // let check = indexs.find((i) => i === index);
315
+
316
+ // if (check !== undefined) {
317
+ // itemHtml += `${itemValue}`;
318
+ // } else {
319
+ // itemHtml += `<span class='highlight'>${itemValue}</span>`;
320
+ // }
321
+ // });
322
+
323
+ let ScrabbleLetterScore = ScrabbleScore();
324
+ sum = 0;
325
+ item = item.toLowerCase();
326
+ for (let i = 0; i < item.length; i++) {
327
+ sum += ScrabbleLetterScore[item[i]] || 0; // for unknown characters
328
+ }
329
+ dataArr.push(item);
330
+
331
+ if (item.length === 1) {
332
+ ok = false;
333
+ newWordsLength = newWordsLength - 1;
334
+ } else {
335
+ return `<a class="anchor__style" title="Lookup ${item} in Dictionary" target="_blank" href="/word-meaning?search=${item.toLowerCase()}">
336
+ <li>${item}
337
+ <span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
338
+ </li></a>`;
339
+ }
340
+ });
341
+ if (result[0] !== undefined) {
342
+ tab_container.innerHTML += `
343
+ <input type="button" id="Tab_${i}" onclick="Filtering(${i})" value="${i} Letter"
344
+ class="tab_link cursorPointer" />
345
+ `;
346
+ let tabs = document.getElementsByClassName("tab_link");
347
+ tabs[0] ? tabs[0].classList.add("active-tab") : "";
348
+ main.innerHTML += `
349
+ <div class="allGroupWords wordlistContainer" id="alpha_${i}">
350
+ <div class="wordListHeading">
351
+ <h3 class="lead">${i} Letter Words</h3>
352
+ </div>
353
+ <div class="wordList">
354
+ <ul class="ul list-unstyled">
355
+ ${result.join("")}
356
+ </ul>
357
+ </div>
358
+ </div>
359
+ `;
360
+ }
361
+ }
362
+ }
363
+ if (newWordsLength === 0) {
364
+ hideResultPageComponents();
365
+ errorMsg.innerHTML = "no words found";
366
+ }
367
+ }
368
+ }
369
+
370
+ function filterRepeatedWords(includeValue, newdata) {
371
+ let data = [];
372
+ let filteredData = [];
373
+ let check,
374
+ dCheck = false;
375
+
376
+ if (includeValue) {
377
+ newdata.map((item) => {
378
+ var matchCounter = 0;
379
+ var tempArr = [];
380
+ for (let e = 0; e < item.length; e++) {
381
+ var element = item[e].toLowerCase();
382
+ if (includeValue.includes(element)) {
383
+ check = true;
384
+ if (!tempArr.includes(element.charCodeAt())) {
385
+ tempArr.push(element.charCodeAt());
386
+ matchCounter++;
387
+ }
388
+ } else {
389
+ check = false;
390
+ break;
391
+ }
392
+ }
393
+ if (check === true && matchCounter >= includeValue.length) {
394
+ var arr1 = getRepeatedChars(item, includeValue);
395
+ if (arr1.length != 0) {
396
+ arr1.map((elem) => {
397
+ if (item.includes(elem)) {
398
+ dCheck = true;
399
+ }
400
+ });
401
+ if (dCheck == true) {
402
+ data.push(item);
403
+ }
404
+ }
405
+ }
406
+ });
407
+ }
408
+ return data;
409
+ }
410
+
411
+ const getRepeatedChars = (str, userInput) => {
412
+ var userInputArr = userInput.split("");
413
+ const chars = {};
414
+ for (const char of str) {
415
+ chars[char] = (chars[char] || 0) + 1;
416
+ }
417
+ return Object.entries(chars)
418
+ .filter((char) => char[1] > 1 && userInputArr.includes(char[0]))
419
+ .map((char) => char[0]);
420
+ };
421
+
422
+ // sorting by points
423
+ function sortPointsby(sortValue, data) {
424
+ main.innerHTML = "";
425
+ if (sortValue) {
426
+ let newWordsLength = 0;
427
+ for (let i = serachValue.length; i >= 1; i--) {
428
+ var newdata = data.filter((item) => item.length === i);
429
+ if (newdata.length === 0) {
430
+ main.innerHTML += "";
431
+ } else {
432
+ newWordsLength += newdata.length;
433
+ var newArray = [];
434
+ newdata.map((item) => {
435
+ if (item.length === 1) {
436
+ ok = false;
437
+ newWordsLength = newWordsLength - 1;
438
+ } else {
439
+ let ScrabbleLetterScore = ScrabbleScore();
440
+ let points = 0;
441
+ item = item.toLowerCase();
442
+ for (let i = 0; i < item.length; i++) {
443
+ points += ScrabbleLetterScore[item[i]] || 0; // for unknown characters
444
+ }
445
+ const value = {
446
+ words: item,
447
+ points: points,
448
+ };
449
+ newArray.push(value);
450
+ }
451
+ });
452
+
453
+ newArray.sort(function (a, b) {
454
+ return b.points - a.points;
455
+ });
456
+ const result = newArray.map((item) => {
457
+ var text1 = serachValue.replace("?", "");
458
+ var text2 = item.words;
459
+ var text3 = item.words;
460
+ function findIndex(str, char) {
461
+ const strLength = str.length;
462
+ const indexes = [];
463
+ let newStr = str;
464
+ while (newStr && newStr.indexOf(char) > -1) {
465
+ indexes.push(newStr.indexOf(char) + strLength - newStr.length);
466
+ newStr = newStr.substring(newStr.indexOf(char) + 1);
467
+ newStr = newStr.substring(newStr.indexOf(char) + 1);
468
+ }
469
+ return indexes;
470
+ }
471
+ let chars = text1.split("");
472
+ let indexs = [];
473
+ chars.map((i) => {
474
+ let findIndexes = findIndex(text3, i);
475
+ if (findIndexes.length > 0) {
476
+ text3 = text3.split("");
477
+ text3[findIndexes] = "$";
478
+ text3 = text3.join("");
479
+ indexs = [...indexs, ...findIndexes];
480
+ }
481
+ });
482
+ let itemHtml = "";
483
+ text2.split("").map((itemValue, index) => {
484
+ let check = indexs.find((i) => i === index);
485
+ if (check !== undefined) {
486
+ itemHtml += `${itemValue}`;
487
+ } else {
488
+ itemHtml += `<span class='highlight'>${itemValue}</span>`;
489
+ }
490
+ });
491
+ return `<a class="anchor__style" title="Lookup ${item} in Dictionary" target="_blank" href="/word-meaning?search=${item.words}">
492
+ <li>${itemHtml}
493
+ <span class="points" value="${item.points}" style="position:relative; top:4px; font-size:12px"> ${item.points}</span>
494
+ </li></a>`;
495
+ });
496
+
497
+ main.innerHTML += `
498
+ <div class="allGroupWords wordlistContainer" id="alpha_${i}">
499
+ <div class="wordListHeading">
500
+ <h3 class="lead">${i} Letter Words</h3>
501
+ </div>
502
+ <div class="wordList">
503
+ <ul class="ul list-unstyled">
504
+ ${result.join("")}
505
+ </ul>
506
+ </div>
507
+ </div>
508
+ `;
509
+ }
510
+ }
511
+ }
512
+ }
513
+
514
+ // Scrabble Point Array
515
+ const ScrabbleScore = () => {
516
+ let twl06_sowpods = {
517
+ a: 1,
518
+ e: 1,
519
+ i: 1,
520
+ o: 1,
521
+ u: 1,
522
+ l: 1,
523
+ n: 1,
524
+ r: 1,
525
+ s: 1,
526
+ t: 1,
527
+ d: 2,
528
+ g: 2,
529
+ b: 3,
530
+ c: 3,
531
+ m: 3,
532
+ p: 3,
533
+ f: 4,
534
+ h: 4,
535
+ v: 4,
536
+ w: 4,
537
+ y: 4,
538
+ k: 5,
539
+ j: 8,
540
+ x: 8,
541
+ q: 10,
542
+ z: 10,
543
+ };
544
+
545
+ let wwfScore = {
546
+ a: 1,
547
+ b: 4,
548
+ c: 4,
549
+ d: 2,
550
+ e: 1,
551
+ f: 4,
552
+ g: 3,
553
+ h: 3,
554
+ i: 1,
555
+ j: 10,
556
+ k: 5,
557
+ l: 2,
558
+ m: 4,
559
+ n: 2,
560
+ o: 1,
561
+ p: 4,
562
+ q: 10,
563
+ r: 1,
564
+ s: 1,
565
+ t: 1,
566
+ u: 2,
567
+ v: 5,
568
+ w: 4,
569
+ x: 8,
570
+ y: 3,
571
+ z: 10,
572
+ };
573
+
574
+ if (dictonary === "wwf") {
575
+ return wwfScore;
576
+ } else {
577
+ return twl06_sowpods;
578
+ }
579
+ };
580
+ //Handling of filter counter in advanced filter
581
+ function addFilterCount() {
582
+ let filter_val = document.getElementsByClassName("filter_val");
583
+ let filter = document.querySelector(".filter_count");
584
+ let filter_count = filter_val.length;
585
+ if (filter_count === 0) {
586
+ filter.style.display = "none";
587
+ } else {
588
+ filter.style.display = "inline-block";
589
+ }
590
+
591
+ filter.innerHTML = filter_count;
592
+ }
593
+
594
+ // handling of filter on scroll
595
+ window.onscroll = function () {
596
+ var section = document.querySelectorAll(".wordlistContainer");
597
+ let new_sections = {};
598
+ Array.prototype.forEach.call(section, function (e) {
599
+ if (document.body.clientWidth > 991) {
600
+ new_sections[e.id] = e.offsetTop - 10;
601
+ } else {
602
+ new_sections[e.id] = e.offsetTop - 10;
603
+ }
604
+ });
605
+ var scrollPosition =
606
+ document.documentElement.scrollTop || document.body.scrollTop;
607
+ for (i in new_sections) {
608
+ let sort_val = document.querySelector(".sort-select").value;
609
+ if (
610
+ i.split("_")[0] == sort_val &&
611
+ new_sections[i] &&
612
+ new_sections[i] <= scrollPosition
613
+ ) {
614
+ document.querySelector(".active-tab").classList.remove("active-tab");
615
+ var active_now = document.querySelector("#Tab_" + i.split("_")[1]);
616
+ active_now.classList.add("active-tab");
617
+ active_now.scrollIntoView({ block: "nearest" });
618
+ }
619
+ }
620
+ };
621
+
622
+ // Add Filtering
623
+ let sections = {};
624
+ function Filtering(id) {
625
+ let tabs = document.getElementsByClassName("tab_link");
626
+ tabs[0] ? tabs[0].classList.add("active-tab") : "";
627
+
628
+ Array.from(tabs).map((item) => {
629
+ item.classList.remove("active-tab");
630
+ });
631
+ main.innerHTML += ``;
632
+ let activeLetter = event.target;
633
+ activeLetter.classList.add("active-tab");
634
+
635
+ var section = document.querySelectorAll(".allGroupWords");
636
+ var sort_val = "alpha";
637
+ Array.prototype.forEach.call(section, function (e) {
638
+ if (document.body.clientWidth > 991) {
639
+ sections[e.id] = e.offsetTop - 10;
640
+ } else {
641
+ sections[e.id] = e.offsetTop - 10;
642
+ }
643
+ });
644
+ document.documentElement.scrollTop = sections[sort_val + "_" + id] + 5;
645
+
646
+ setTimeout(() => {
647
+ document.documentElement.scrollTop = sections[sort_val + "_" + id] + 5;
648
+ }, 150);
649
+ }
650
+
651
+ // next && previous functionality
652
+ let prev = document.getElementById("prev");
653
+ let next = document.getElementById("next");
654
+
655
+ if (prev) {
656
+ prev.onclick = scroll_Right;
657
+ }
658
+ if (next) {
659
+ next.onclick = scroll_Left;
660
+ }
661
+ window.addEventListener("resize", function () {
662
+ scroll_visible();
663
+ });
664
+ window.addEventListener("scroll", function () {
665
+ scroll_visible();
666
+ });
667
+ function scroll_visible() {
668
+ let tab_container = document.querySelector("#tab-container");
669
+ if (tab_container) {
670
+ if (tab_container.clientWidth === tab_container.scrollWidth) {
671
+ prev.style.display = "none";
672
+ next.style.display = "none";
673
+ } else {
674
+ prev.style.display = "block";
675
+ next.style.display = "block";
676
+ }
677
+ }
678
+ }
679
+ scroll_visible();
680
+
681
+ function scroll_Left() {
682
+ tab_container.scrollLeft += 130;
683
+ }
684
+ function scroll_Right() {
685
+ tab_container.scrollLeft -= 130;
686
+ }
687
+ function findIndex(str, char) {
688
+ const strLength = str.length;
689
+ const indexes = [];
690
+ let newStr = str;
691
+
692
+ while (newStr && newStr.indexOf(char) > -1) {
693
+ indexes.push(newStr.indexOf(char) + strLength - newStr.length);
694
+ newStr = newStr.substring(newStr.indexOf(char) + 5);
695
+ newStr = newStr.substring(newStr.indexOf(char) + 5);
696
+ }
697
+
698
+ return indexes;
699
+ }
700
+ //event listeners
701
+
702
+ txtBox.addEventListener("input", (e) => {
703
+ if (e.target.value === "") {
704
+ letterCloseButton.classList.remove("ltr-cls-btn-commonPage");
705
+ } else {
706
+ letterCloseButton.classList.add("ltr-cls-btn-commonPage");
707
+ }
708
+ let rangeOfBlankTile = script.dataset.range;
709
+ e.target.value = e.target.value.replace(/[^a-zA-Z? ]/g, "");
710
+ if (rangeOfBlankTile === "") {
711
+ rangeOfBlankTile = 3;
712
+ }
713
+ e.target.value = e.target.value.replace(/ /g, "?");
714
+ let data = [];
715
+ data = e.target.value.split("").filter((i) => i === "?");
716
+ if (data.length > rangeOfBlankTile) {
717
+ e.target.value = e.target.value.replace(/\?$/, "");
718
+ }
719
+ });
720
+
721
+ //sort up listeners
722
+ sortup.addEventListener("click", () => {
723
+ if (bool) {
724
+ theSelect.size = 0;
725
+ bool = false;
726
+ theSelect.style.display = "none";
727
+ } else {
728
+ bool = true;
729
+ theSelect.size = 3;
730
+ theSelect.style.display = "block";
731
+ }
732
+ });
733
+
734
+ function init() {
735
+ var url = window.location.href;
736
+
737
+ if (url.includes("?")) {
738
+ showResultPageComponents();
739
+ setParamValues(queryParams);
740
+ window.onload = function (e) {
741
+ logSubmit(e);
742
+ };
743
+ }
744
+ }
745
+
746
+ function showResultPageComponents() {
747
+ sortSelect.style.display = "block";
748
+ document.querySelector(".tab_link_wrapper").style.display = "flex";
749
+ }
750
+
751
+ function hideResultPageComponents() {
752
+ sortSelect.style.display = "none";
753
+ document.querySelector(".tab_link_wrapper").style.display = "none";
754
+ }
755
+
756
+ function sortWords(data) {
757
+ if (sortingFilter.selectedIndex == 0) {
758
+ return data;
759
+ } else if (sortingFilter.selectedIndex == 1) {
760
+ return data.sort();
761
+ } else if (sortingFilter.selectedIndex == 2) {
762
+ return data.reverse();
763
+ } else if (sortingFilter.selectedIndex == 3) {
764
+ var tempArr = [];
765
+ var newArray = [];
766
+ data.map((item) => {
767
+ let newWordsLength = 0;
768
+ if (item.length === 1) {
769
+ ok = false;
770
+ newWordsLength = newWordsLength - 1;
771
+ } else {
772
+ let ScrabbleLetterScore = ScrabbleScore();
773
+ let points = 0;
774
+ item = item.toLowerCase();
775
+ for (let i = 0; i < item.length; i++) {
776
+ points += ScrabbleLetterScore[item[i]] || 0; // for unknown characters
777
+ }
778
+ const value = {
779
+ words: item,
780
+ points: points,
781
+ };
782
+ newArray.push(value);
783
+ }
784
+ });
785
+
786
+ newArray.sort(function (a, b) {
787
+ return b.points - a.points;
788
+ });
789
+
790
+ newArray.map((ele) => {
791
+ tempArr.push(ele.words);
792
+ });
793
+
794
+ return tempArr;
795
+ }
796
+ }
797
+
798
+ init();
@@ -0,0 +1,48 @@
1
+ function resultPage2(queryParams) {
2
+ var newUrl = window.location.href;
3
+ if (!newUrl.includes("?")) {
4
+ setParams(queryParams);
5
+ } else {
6
+ setParams(queryParams);
7
+ gtag("event", "page_view", {
8
+ page_location: window.location.pathname + location.search,
9
+ });
10
+ }
11
+ }
12
+
13
+ function setParams(queryParams) {
14
+ let url =
15
+ window.location.protocol +
16
+ "//" +
17
+ window.location.host +
18
+ "/" +
19
+ permaLink +
20
+ "?";
21
+ for (queryP of queryParams) {
22
+ var value;
23
+
24
+ if (queryP.values.tagName == "INPUT") {
25
+ value = queryP.values.value;
26
+ } else if (queryP.values.tagName == "SELECT") {
27
+ value = queryP.values.selectedIndex;
28
+ }
29
+
30
+ if (history.pushState) {
31
+ var str = "&" + queryP.name + "=" + value;
32
+ url = url + str;
33
+ }
34
+ }
35
+ window.history.pushState({ path: url }, "", url);
36
+ }
37
+
38
+ function setParamValues(queryParams) {
39
+ const params = new URLSearchParams(window.location.search);
40
+ for (queryP of queryParams) {
41
+ var parameter_value = params.get(queryP.name);
42
+ if (queryP.values.tagName == "INPUT") {
43
+ queryP.values.value = parameter_value;
44
+ } else if (queryP.values.tagName == "SELECT") {
45
+ queryP.values.selectedIndex = parameter_value;
46
+ }
47
+ }
48
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: word-games-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.2
4
+ version: 1.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - manpreet-appscms
@@ -74,6 +74,7 @@ files:
74
74
  - _data/footer/en/data.json
75
75
  - _data/footer/networksites.json
76
76
  - _data/header/en/data.json
77
+ - _data/repeatLetter/en/repeat-letters.json
77
78
  - _data/theme/colors.json
78
79
  - _data/wordfinderstrategy/en/how-to-use-5-letter-word-finder-to-score-high-in-scrabble-words-with-friends.json
79
80
  - _data/wordgames/ar/four_letter_word_finder.json
@@ -158,6 +159,7 @@ files:
158
159
  - _includes/paginationPostPage.html
159
160
  - _includes/postauthorbio.html
160
161
  - _includes/postbox.html
162
+ - _includes/repeat-letters.html
161
163
  - _includes/script.html
162
164
  - _includes/section/about.html
163
165
  - _includes/section/alertbar.html
@@ -294,6 +296,8 @@ files:
294
296
  - assets/js/leftNav.js
295
297
  - assets/js/noRefreshAds.js
296
298
  - assets/js/other-lang-wordScrabble.js
299
+ - assets/js/repeat-letters.js
300
+ - assets/js/resultPage.js
297
301
  - assets/js/scrabbleDictonary.js
298
302
  - assets/js/wordScrabble-test.js
299
303
  - assets/js/wordScrabble.js