word-games-theme 0.4.7 → 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +21 -21
- data/README.md +2 -2
- data/_data/blog/alertbar.yml +3 -3
- data/_data/blog/blog.yml +2 -2
- data/_data/blog/nav.json +13 -13
- data/_data/footer/en/data.json +74 -74
- data/_data/footer/hi/data.json +68 -68
- data/_data/footer/networksites.json +15 -15
- data/_data/wordgames/en/words_with_friends_word_finder.json +55 -55
- data/_includes/Rating/structureddata.html +53 -53
- data/_includes/author_bio.html +15 -15
- data/_includes/authors/authors.html +27 -27
- data/_includes/autogenerated/content.html +3 -2
- data/_includes/disqus_comments.html +10 -10
- data/_includes/filterWords/index.html +10 -10
- data/_includes/google-analytics.html +22 -22
- data/_includes/header/blogHeader.html +28 -28
- data/_includes/paginationBlogPage.html +34 -34
- data/_includes/paginationPostPage.html +14 -14
- data/_includes/postauthorbio.html +17 -17
- data/_includes/postbox.html +29 -29
- data/_includes/script.html +13 -13
- data/_includes/section/about.html +25 -25
- data/_includes/section/alertbar.html +11 -11
- data/_includes/section/commonPage.html +1 -1
- data/_includes/section/count.html +23 -23
- data/_includes/section/home.html +1 -1
- data/_includes/section/home2.html +1 -1
- data/_includes/section/wordGroup.html +6 -6
- data/_layouts/blog.html +66 -66
- data/_layouts/categories.html +25 -25
- data/_layouts/default.html +17 -0
- data/_layouts/disclaimer.html +115 -115
- data/_layouts/page.html +68 -67
- data/_layouts/privacyPolicy.html +420 -420
- data/_layouts/wordMeaning.html +106 -106
- data/assets/css/HomePageblog.css +154 -154
- data/assets/css/about.css +51 -51
- data/assets/css/feature.css +69 -69
- data/assets/css/footer.css +95 -95
- data/assets/css/news.css +62 -62
- data/assets/css/style.css +5 -1
- data/assets/images/angle-arrow-down.svg +43 -43
- data/assets/images/right.svg +38 -38
- data/assets/images/right2.svg +38 -38
- data/assets/images/right3.svg +38 -38
- data/assets/images/word-games-logo.svg +52 -52
- data/assets/js/TopScroll.js +8 -8
- data/assets/js/advancedFilter.js +5 -5
- data/assets/js/advancedFilter2.js +12 -12
- data/assets/js/advancedFilter3.js +2 -2
- data/assets/js/scrabbleDictonary.js +165 -165
- data/assets/js/wordScrabble.js +158 -8
- metadata +7 -7
data/assets/js/wordScrabble.js
CHANGED
@@ -7,6 +7,7 @@ let form = document.querySelector('#form')
|
|
7
7
|
let wordCount = document.querySelector('.wordCount')
|
8
8
|
let main = document.querySelector('.main')
|
9
9
|
let errorMsg = document.querySelector('.errorMsg')
|
10
|
+
let script = document.currentScript
|
10
11
|
|
11
12
|
// getqueryUrl from form
|
12
13
|
const params = new URLSearchParams(window.location.search)
|
@@ -33,19 +34,53 @@ var sortBool = false
|
|
33
34
|
|
34
35
|
let txtBox = document.querySelector('.txtBox')
|
35
36
|
txtBox.value = serachValue
|
36
|
-
|
37
|
+
txtBox.addEventListener('keyup', (e) => {
|
38
|
+
let rangeOfBlankTile = script.dataset.range
|
39
|
+
e.target.value = e.target.value.replace(/[^a-zA-Z? ]/g, '')
|
40
|
+
if (rangeOfBlankTile === null) {
|
41
|
+
rangeOfBlankTile = 10
|
42
|
+
}
|
43
|
+
e.target.value = e.target.value.replace(/ /g, '?')
|
44
|
+
let data = []
|
45
|
+
data = e.target.value.split('').filter((i) => i === '?')
|
46
|
+
if (data.length > rangeOfBlankTile) {
|
47
|
+
e.target.value = e.target.value.replace(/\?$/, '')
|
48
|
+
}
|
49
|
+
})
|
37
50
|
var theSelect = document.getElementById('select_dropDown')
|
38
51
|
document.querySelector('.select_dropDown2').value = dictonary
|
52
|
+
const getDiff = (text1, text2) => {
|
53
|
+
var diffRange = []
|
54
|
+
var currentRange = undefined
|
55
|
+
for (var i = 0; i < text1.length; i++) {
|
56
|
+
if (text1[i] != text2[i]) {
|
57
|
+
if (currentRange == undefined) {
|
58
|
+
currentRange = [i]
|
59
|
+
}
|
60
|
+
}
|
61
|
+
if (currentRange != undefined && text1[i] == text2[i]) {
|
62
|
+
currentRange.push(i)
|
63
|
+
diffRange.push(currentRange)
|
64
|
+
currentRange = undefined
|
65
|
+
}
|
66
|
+
}
|
67
|
+
if (currentRange != undefined) {
|
68
|
+
currentRange.push(i)
|
69
|
+
diffRange.push(currentRange)
|
70
|
+
}
|
71
|
+
return diffRange
|
72
|
+
}
|
39
73
|
|
40
74
|
// getWords define...
|
41
75
|
const getData = async (serachValue) => {
|
42
76
|
try {
|
77
|
+
let selectedDictionary = document.querySelector('.select_dropDown2').value
|
43
78
|
main.innerHTML = `<div class="loader">
|
44
79
|
<img src='/assets/images/loading.gif'>
|
45
80
|
</div>`
|
46
81
|
/// loader
|
47
82
|
const response = await fetch(
|
48
|
-
`/.netlify/functions/getWords?name=${serachValue}`
|
83
|
+
`/.netlify/functions/getWords?name=${serachValue}&selecteddictionary=${selectedDictionary}`
|
49
84
|
)
|
50
85
|
const data = await response.json()
|
51
86
|
main.innerHTML = ''
|
@@ -123,8 +158,31 @@ function getWords(data) {
|
|
123
158
|
main.innerHTML += ''
|
124
159
|
} else {
|
125
160
|
newWordsLength += newdata.length
|
126
|
-
|
127
161
|
const result = newdata.map((item) => {
|
162
|
+
var text1 = serachValue.replace('?', '')
|
163
|
+
var text2 = item
|
164
|
+
var text3 = item
|
165
|
+
let chars = text1.split('')
|
166
|
+
let indexs = []
|
167
|
+
chars.map((i) => {
|
168
|
+
let findIndexes = findIndex(text3, i)
|
169
|
+
if (findIndexes.length > 0) {
|
170
|
+
text3 = text3.split('')
|
171
|
+
text3[findIndexes] = '$'
|
172
|
+
text3 = text3.join('')
|
173
|
+
indexs = [...indexs, ...findIndexes]
|
174
|
+
}
|
175
|
+
})
|
176
|
+
let itemHtml = ''
|
177
|
+
text2.split('').map((itemValue, index) => {
|
178
|
+
let check = indexs.find((i) => i === index)
|
179
|
+
if (check !== undefined) {
|
180
|
+
itemHtml += `${itemValue}`
|
181
|
+
} else {
|
182
|
+
itemHtml += `<span class='highlight'>${itemValue}</span>`
|
183
|
+
}
|
184
|
+
})
|
185
|
+
|
128
186
|
if (item.length === 1) {
|
129
187
|
ok = false
|
130
188
|
newWordsLength = newWordsLength - 1
|
@@ -136,7 +194,7 @@ function getWords(data) {
|
|
136
194
|
sum += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
|
137
195
|
}
|
138
196
|
return `<a class="anchor__style" title="Lookup python in Dictionary" target="_blank" href="/word-meaning?search=${item}">
|
139
|
-
<li>${
|
197
|
+
<li>${itemHtml}
|
140
198
|
<span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
|
141
199
|
</li></a>`
|
142
200
|
}
|
@@ -149,7 +207,6 @@ function getWords(data) {
|
|
149
207
|
`
|
150
208
|
let tabs = document.getElementsByClassName('tab_link')
|
151
209
|
tabs[0] ? tabs[0].classList.add('active-tab') : ''
|
152
|
-
|
153
210
|
main.innerHTML += `
|
154
211
|
<div class="allGroupWords wordlistContainer" id="alpha_${i}">
|
155
212
|
<div class="wordListHeading">
|
@@ -213,8 +270,42 @@ function sortPointsby(sortValue, data) {
|
|
213
270
|
})
|
214
271
|
|
215
272
|
const result = newArray.map((item) => {
|
273
|
+
var text1 = serachValue.replace('?', '')
|
274
|
+
var text2 = item.words
|
275
|
+
var text3 = item.words
|
276
|
+
function findIndex(str, char) {
|
277
|
+
const strLength = str.length
|
278
|
+
const indexes = []
|
279
|
+
let newStr = str
|
280
|
+
while (newStr && newStr.indexOf(char) > -1) {
|
281
|
+
indexes.push(newStr.indexOf(char) + strLength - newStr.length)
|
282
|
+
newStr = newStr.substring(newStr.indexOf(char) + 1)
|
283
|
+
newStr = newStr.substring(newStr.indexOf(char) + 1)
|
284
|
+
}
|
285
|
+
return indexes
|
286
|
+
}
|
287
|
+
let chars = text1.split('')
|
288
|
+
let indexs = []
|
289
|
+
chars.map((i) => {
|
290
|
+
let findIndexes = findIndex(text3, i)
|
291
|
+
if (findIndexes.length > 0) {
|
292
|
+
text3 = text3.split('')
|
293
|
+
text3[findIndexes] = '$'
|
294
|
+
text3 = text3.join('')
|
295
|
+
indexs = [...indexs, ...findIndexes]
|
296
|
+
}
|
297
|
+
})
|
298
|
+
let itemHtml = ''
|
299
|
+
text2.split('').map((itemValue, index) => {
|
300
|
+
let check = indexs.find((i) => i === index)
|
301
|
+
if (check !== undefined) {
|
302
|
+
itemHtml += `${itemValue}`
|
303
|
+
} else {
|
304
|
+
itemHtml += `<span class='highlight'>${itemValue}</span>`
|
305
|
+
}
|
306
|
+
})
|
216
307
|
return `<a class="anchor__style" title="Lookup python in Dictionary" target="_blank" href="/word-meaning?search=${item.words}">
|
217
|
-
<li>${
|
308
|
+
<li>${itemHtml}
|
218
309
|
<span class="points" value="${item.points}" style="position:relative; top:4px; font-size:12px"> ${item.points}</span>
|
219
310
|
</li></a>`
|
220
311
|
})
|
@@ -251,6 +342,29 @@ function sortby(sortBool, data) {
|
|
251
342
|
newWordsLength += newdata.length
|
252
343
|
|
253
344
|
const result = newdata.map((item) => {
|
345
|
+
var text1 = serachValue.replace('?', '')
|
346
|
+
var text2 = item
|
347
|
+
var text3 = item
|
348
|
+
let chars = text1.split('')
|
349
|
+
let indexs = []
|
350
|
+
chars.map((i) => {
|
351
|
+
let findIndexes = findIndex(text3, i)
|
352
|
+
if (findIndexes.length > 0) {
|
353
|
+
text3 = text3.split('')
|
354
|
+
text3[findIndexes] = '$'
|
355
|
+
text3 = text3.join('')
|
356
|
+
indexs = [...indexs, ...findIndexes]
|
357
|
+
}
|
358
|
+
})
|
359
|
+
let itemHtml = ''
|
360
|
+
text2.split('').map((itemValue, index) => {
|
361
|
+
let check = indexs.find((i) => i === index)
|
362
|
+
if (check !== undefined) {
|
363
|
+
itemHtml += `${itemValue}`
|
364
|
+
} else {
|
365
|
+
itemHtml += `<span class='highlight'>${itemValue}</span>`
|
366
|
+
}
|
367
|
+
})
|
254
368
|
if (item.length === 1) {
|
255
369
|
ok = false
|
256
370
|
newWordsLength = newWordsLength - 1
|
@@ -263,7 +377,7 @@ function sortby(sortBool, data) {
|
|
263
377
|
}
|
264
378
|
|
265
379
|
return `<a class="anchor__style" title="Lookup python in Dictionary" target="_blank" href="/word-meaning?search=${item}">
|
266
|
-
<li>${
|
380
|
+
<li>${itemHtml}
|
267
381
|
<span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
|
268
382
|
</li></a>`
|
269
383
|
}
|
@@ -292,6 +406,29 @@ function sortby(sortBool, data) {
|
|
292
406
|
main.innerHTML += ''
|
293
407
|
} else {
|
294
408
|
const result = newdata.map((item) => {
|
409
|
+
var text1 = serachValue.replace('?', '')
|
410
|
+
var text2 = item
|
411
|
+
var text3 = item
|
412
|
+
let chars = text1.split('')
|
413
|
+
let indexs = []
|
414
|
+
chars.map((i) => {
|
415
|
+
let findIndexes = findIndex(text3, i)
|
416
|
+
if (findIndexes.length > 0) {
|
417
|
+
text3 = text3.split('')
|
418
|
+
text3[findIndexes] = '$'
|
419
|
+
text3 = text3.join('')
|
420
|
+
indexs = [...indexs, ...findIndexes]
|
421
|
+
}
|
422
|
+
})
|
423
|
+
let itemHtml = ''
|
424
|
+
text2.split('').map((itemValue, index) => {
|
425
|
+
let check = indexs.find((i) => i === index)
|
426
|
+
if (check !== undefined) {
|
427
|
+
itemHtml += `${itemValue}`
|
428
|
+
} else {
|
429
|
+
itemHtml += `<span class='highlight'>${itemValue}</span>`
|
430
|
+
}
|
431
|
+
})
|
295
432
|
if (item.length === 1) {
|
296
433
|
ok = false
|
297
434
|
} else {
|
@@ -303,7 +440,7 @@ function sortby(sortBool, data) {
|
|
303
440
|
}
|
304
441
|
|
305
442
|
return `<a class="anchor__style" title="Lookup python in Dictionary" target="_blank" href="/word-meaning?search=${item}">
|
306
|
-
<li>${
|
443
|
+
<li>${itemHtml}
|
307
444
|
<span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
|
308
445
|
</li></a>`
|
309
446
|
}
|
@@ -509,3 +646,16 @@ function scroll_Left() {
|
|
509
646
|
function scroll_Right() {
|
510
647
|
tab_container.scrollLeft -= 130
|
511
648
|
}
|
649
|
+
function findIndex(str, char) {
|
650
|
+
const strLength = str.length
|
651
|
+
const indexes = []
|
652
|
+
let newStr = str
|
653
|
+
|
654
|
+
while (newStr && newStr.indexOf(char) > -1) {
|
655
|
+
indexes.push(newStr.indexOf(char) + strLength - newStr.length)
|
656
|
+
newStr = newStr.substring(newStr.indexOf(char) + 1)
|
657
|
+
newStr = newStr.substring(newStr.indexOf(char) + 1)
|
658
|
+
}
|
659
|
+
|
660
|
+
return indexes
|
661
|
+
}
|
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: 0.4.
|
4
|
+
version: 0.4.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- manpreet-appscms
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '12.0'
|
55
|
-
description:
|
55
|
+
description:
|
56
56
|
email:
|
57
57
|
- manpreet@appscms.com
|
58
58
|
executables: []
|
@@ -217,7 +217,7 @@ homepage: https://github.com/Contenttool/word-games-theme
|
|
217
217
|
licenses:
|
218
218
|
- MIT
|
219
219
|
metadata: {}
|
220
|
-
post_install_message:
|
220
|
+
post_install_message:
|
221
221
|
rdoc_options: []
|
222
222
|
require_paths:
|
223
223
|
- lib
|
@@ -232,8 +232,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
232
232
|
- !ruby/object:Gem::Version
|
233
233
|
version: '0'
|
234
234
|
requirements: []
|
235
|
-
rubygems_version: 3.1.
|
236
|
-
signing_key:
|
235
|
+
rubygems_version: 3.1.6
|
236
|
+
signing_key:
|
237
237
|
specification_version: 4
|
238
238
|
summary: Word-Games theme for all word-games-sites
|
239
239
|
test_files: []
|