word-games-theme 0.1.9 → 0.2.0
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/blog/share.yml +26 -27
- 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/header/en/data.json +68 -71
- data/_data/wordgames/en/anagram_word_finder.json +48 -48
- data/_data/wordgames/en/eight_letter_word_finder.json +223 -223
- data/_data/wordgames/en/eleven_letter_word_finder.json +184 -184
- data/_data/wordgames/en/five_letter_word_finder.json +188 -188
- data/_data/wordgames/en/four_letter_word_finder.json +176 -176
- data/_data/wordgames/en/jumble_word_finder.json +54 -62
- data/_data/wordgames/en/lexical_word_finder.json +60 -60
- data/_data/wordgames/en/nine_letter_word_finder.json +184 -184
- data/_data/wordgames/en/root.json +79 -79
- data/_data/wordgames/en/scrabble_word_finder_cheat.json +48 -48
- data/_data/wordgames/en/seven_letter_word_finder.json +184 -184
- data/_data/wordgames/en/six_letter_word_finder.json +175 -175
- data/_data/wordgames/en/ten_letter_word_finder.json +184 -184
- data/_data/wordgames/en/thirteen_letter_word_finder.json +184 -184
- data/_data/wordgames/en/three_letter_word_finder.json +188 -188
- data/_data/wordgames/en/twelve_letter_word_finder.json +184 -184
- data/_data/wordgames/en/two_letter_word_finder.json +188 -188
- data/_data/wordgames/en/words_with_friends_word_finder.json +55 -55
- data/_includes/Rating/rating.html +91 -87
- data/_includes/Rating/structureddata.html +53 -53
- data/_includes/author_bio.html +15 -15
- data/_includes/authors/authors.html +27 -27
- data/_includes/custom-head.html +31 -31
- data/_includes/disqus_comments.html +10 -10
- data/_includes/filterWords/index.html +10 -10
- data/_includes/footer/index.html +47 -43
- data/_includes/google-analytics.html +22 -22
- data/_includes/head/index.html +108 -104
- data/_includes/header/blogHeader.html +28 -28
- data/_includes/header/index.html +41 -46
- 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/blog.html +41 -41
- data/_includes/section/commonPage.html +99 -92
- data/_includes/section/count.html +23 -23
- data/_includes/section/feature.html +34 -34
- data/_includes/section/home.html +94 -89
- data/_includes/section/home2.html +90 -83
- data/_includes/section/news.html +32 -32
- data/_includes/section/recent_posts.html +42 -42
- data/_includes/section/related_categories_post.html +73 -73
- data/_includes/section/related_tag_post.html +59 -59
- data/_includes/section/wordGroup.html +6 -6
- data/_includes/seo.html +56 -57
- data/_includes/share/socialshare.html +49 -50
- data/_layouts/blog.html +66 -66
- data/_layouts/categories.html +25 -25
- data/_layouts/default.html +43 -43
- data/_layouts/disclaimer.html +115 -115
- data/_layouts/page.html +67 -67
- data/_layouts/page2.html +60 -60
- data/_layouts/post.html +69 -69
- data/_layouts/privacyPolicy.html +420 -420
- data/_layouts/termAndCondition.html +421 -421
- data/_layouts/wordMeaning.html +106 -106
- data/assets/css/HomePageblog.css +154 -154
- data/assets/css/about.css +51 -51
- data/assets/css/advancedFilter.css +160 -160
- data/assets/css/blog.css +481 -481
- data/assets/css/feature.css +69 -69
- data/assets/css/footer.css +95 -95
- data/assets/css/home.css +235 -234
- data/assets/css/news.css +62 -62
- data/assets/css/style.css +399 -386
- data/assets/css/wordGroup.css +62 -62
- data/assets/images/angle-arrow-down.svg +43 -43
- data/assets/images/facebook-square.svg +1 -0
- data/assets/images/facebook.svg +1 -0
- data/assets/images/instagram-square.svg +1 -0
- data/assets/images/linkedin.svg +1 -0
- data/assets/images/linkedin2.svg +1 -0
- data/assets/images/ratingStar.png +0 -0
- data/assets/images/right.svg +38 -38
- data/assets/images/right2.svg +38 -38
- data/assets/images/right3.svg +38 -38
- data/assets/images/star.svg +1 -0
- data/assets/images/twitter-square.svg +1 -0
- data/assets/images/twitter.svg +1 -0
- data/assets/images/twitter2.svg +1 -0
- data/assets/images/window-close.png +0 -0
- data/assets/images/window-close.svg +1 -0
- data/assets/images/word-games-logo.svg +52 -52
- data/assets/js/TopScroll.js +8 -8
- data/assets/js/X-letter.js +359 -359
- 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 +511 -510
- metadata +19 -8
- data/_data/header/hi/data.json +0 -145
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!-- Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M528.1 171.5L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6zM388.6 312.3l23.7 138.4L288 385.4l-124.3 65.3 23.7-138.4-100.6-98 139-20.2 62.2-126 62.2 126 139 20.2-100.6 98z"/></svg>
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-48.9 158.8c.2 2.8.2 5.7.2 8.5 0 86.7-66 186.6-186.6 186.6-37.2 0-71.7-10.8-100.7-29.4 5.3.6 10.4.8 15.8.8 30.7 0 58.9-10.4 81.4-28-28.8-.6-53-19.5-61.3-45.5 10.1 1.5 19.2 1.5 29.6-1.2-30-6.1-52.5-32.5-52.5-64.4v-.8c8.7 4.9 18.9 7.9 29.6 8.3a65.447 65.447 0 0 1-29.2-54.6c0-12.2 3.2-23.4 8.9-33.1 32.3 39.8 80.8 65.8 135.2 68.6-9.3-44.5 24-80.6 64-80.6 18.9 0 35.9 7.9 47.9 20.7 14.8-2.8 29-8.3 41.6-15.8-4.9 15.2-15.2 28-28.8 36.1 13.2-1.4 26-5.1 37.8-10.2-8.9 13.1-20.1 24.7-32.9 34z"/></svg>
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg id="SvgjsSvg1016" width="288" height="288" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs"><defs id="SvgjsDefs1017"></defs><g id="SvgjsG1018"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="288" height="288"><path d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z" fill="#ffffff" class="color000 svgShape"></path></svg></g></svg>
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"/></svg>
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M464 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-83.6 290.5c4.8 4.8 4.8 12.6 0 17.4l-40.5 40.5c-4.8 4.8-12.6 4.8-17.4 0L256 313.3l-66.5 67.1c-4.8 4.8-12.6 4.8-17.4 0l-40.5-40.5c-4.8-4.8-4.8-12.6 0-17.4l67.1-66.5-67.1-66.5c-4.8-4.8-4.8-12.6 0-17.4l40.5-40.5c4.8-4.8 12.6-4.8 17.4 0l66.5 67.1 66.5-67.1c4.8-4.8 12.6-4.8 17.4 0l40.5 40.5c4.8 4.8 4.8 12.6 0 17.4L313.3 256l67.1 66.5z"/></svg>
|
@@ -1,52 +1,52 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3
|
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4
|
-
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
5
|
-
width="435.496px" height="435.496px" viewBox="0 0 435.496 435.496" style="enable-background:new 0 0 435.496 435.496;"
|
6
|
-
xml:space="preserve">
|
7
|
-
<g>
|
8
|
-
<g>
|
9
|
-
<path d="M350.914,17.811C336.771,7.082,319.188,0.637,300.053,0.637H84.398C37.791,0.637,0,38.437,0,85.035v215.664
|
10
|
-
C0,321,7.181,339.617,19.125,354.191c9.62,46.004,50.48,80.668,99.297,80.668h215.645c55.93,0,101.43-45.508,101.43-101.447
|
11
|
-
V117.739C435.496,67.545,398.832,25.872,350.914,17.811z M321.721,301.033h7.01v36.529h-8.252v-28.938h-0.115l-6.971,3.309
|
12
|
-
l-1.396-6.406L321.721,301.033z M180.224,219.398c-37.638-12.546-52.02-32.838-51.647-54.239
|
13
|
-
c0-33.947,28.773-59.393,73.412-59.393c21.027,0,39.484,5.164,50.539,10.69l-9.582,38.748
|
14
|
-
c-8.129-4.428-23.983-10.337-39.111-10.337c-13.655,0-21.391,5.546-21.391,14.382c0,8.864,7.009,13.292,29.137,21.028
|
15
|
-
c34.311,11.8,48.329,29.52,48.702,55.71c0,33.938-26.191,58.666-77.838,58.666c-23.61,0-44.638-5.545-58.293-12.928l9.964-39.848
|
16
|
-
c10.318,6.283,31.729,13.293,48.329,13.293c16.964,0,23.973-5.527,23.973-14.756C206.416,230.834,200.879,226.408,180.224,219.398
|
17
|
-
z M401.395,333.402c0,37.131-30.197,67.348-67.328,67.348H118.422c-16.706,0-31.977-6.158-43.758-16.256
|
18
|
-
c3.194,0.373,6.436,0.604,9.744,0.604h215.645c46.627,0,84.389-37.791,84.389-84.398V85.045c0-4.456-0.449-8.788-1.109-13.053
|
19
|
-
c11.178,12.03,18.072,28.095,18.072,45.756v215.654H401.395z"/>
|
20
|
-
</g>
|
21
|
-
</g>
|
22
|
-
<g>
|
23
|
-
</g>
|
24
|
-
<g>
|
25
|
-
</g>
|
26
|
-
<g>
|
27
|
-
</g>
|
28
|
-
<g>
|
29
|
-
</g>
|
30
|
-
<g>
|
31
|
-
</g>
|
32
|
-
<g>
|
33
|
-
</g>
|
34
|
-
<g>
|
35
|
-
</g>
|
36
|
-
<g>
|
37
|
-
</g>
|
38
|
-
<g>
|
39
|
-
</g>
|
40
|
-
<g>
|
41
|
-
</g>
|
42
|
-
<g>
|
43
|
-
</g>
|
44
|
-
<g>
|
45
|
-
</g>
|
46
|
-
<g>
|
47
|
-
</g>
|
48
|
-
<g>
|
49
|
-
</g>
|
50
|
-
<g>
|
51
|
-
</g>
|
52
|
-
</svg>
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4
|
+
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
5
|
+
width="435.496px" height="435.496px" viewBox="0 0 435.496 435.496" style="enable-background:new 0 0 435.496 435.496;"
|
6
|
+
xml:space="preserve">
|
7
|
+
<g>
|
8
|
+
<g>
|
9
|
+
<path d="M350.914,17.811C336.771,7.082,319.188,0.637,300.053,0.637H84.398C37.791,0.637,0,38.437,0,85.035v215.664
|
10
|
+
C0,321,7.181,339.617,19.125,354.191c9.62,46.004,50.48,80.668,99.297,80.668h215.645c55.93,0,101.43-45.508,101.43-101.447
|
11
|
+
V117.739C435.496,67.545,398.832,25.872,350.914,17.811z M321.721,301.033h7.01v36.529h-8.252v-28.938h-0.115l-6.971,3.309
|
12
|
+
l-1.396-6.406L321.721,301.033z M180.224,219.398c-37.638-12.546-52.02-32.838-51.647-54.239
|
13
|
+
c0-33.947,28.773-59.393,73.412-59.393c21.027,0,39.484,5.164,50.539,10.69l-9.582,38.748
|
14
|
+
c-8.129-4.428-23.983-10.337-39.111-10.337c-13.655,0-21.391,5.546-21.391,14.382c0,8.864,7.009,13.292,29.137,21.028
|
15
|
+
c34.311,11.8,48.329,29.52,48.702,55.71c0,33.938-26.191,58.666-77.838,58.666c-23.61,0-44.638-5.545-58.293-12.928l9.964-39.848
|
16
|
+
c10.318,6.283,31.729,13.293,48.329,13.293c16.964,0,23.973-5.527,23.973-14.756C206.416,230.834,200.879,226.408,180.224,219.398
|
17
|
+
z M401.395,333.402c0,37.131-30.197,67.348-67.328,67.348H118.422c-16.706,0-31.977-6.158-43.758-16.256
|
18
|
+
c3.194,0.373,6.436,0.604,9.744,0.604h215.645c46.627,0,84.389-37.791,84.389-84.398V85.045c0-4.456-0.449-8.788-1.109-13.053
|
19
|
+
c11.178,12.03,18.072,28.095,18.072,45.756v215.654H401.395z"/>
|
20
|
+
</g>
|
21
|
+
</g>
|
22
|
+
<g>
|
23
|
+
</g>
|
24
|
+
<g>
|
25
|
+
</g>
|
26
|
+
<g>
|
27
|
+
</g>
|
28
|
+
<g>
|
29
|
+
</g>
|
30
|
+
<g>
|
31
|
+
</g>
|
32
|
+
<g>
|
33
|
+
</g>
|
34
|
+
<g>
|
35
|
+
</g>
|
36
|
+
<g>
|
37
|
+
</g>
|
38
|
+
<g>
|
39
|
+
</g>
|
40
|
+
<g>
|
41
|
+
</g>
|
42
|
+
<g>
|
43
|
+
</g>
|
44
|
+
<g>
|
45
|
+
</g>
|
46
|
+
<g>
|
47
|
+
</g>
|
48
|
+
<g>
|
49
|
+
</g>
|
50
|
+
<g>
|
51
|
+
</g>
|
52
|
+
</svg>
|
data/assets/js/TopScroll.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
const alertbar = document.querySelector('.alertbar')
|
2
|
-
window.addEventListener('scroll', () => {
|
3
|
-
if (pageYOffset > 200) {
|
4
|
-
alertbar.style.display = 'block'
|
5
|
-
} else {
|
6
|
-
alertbar.style.display = 'none'
|
7
|
-
}
|
8
|
-
})
|
1
|
+
const alertbar = document.querySelector('.alertbar')
|
2
|
+
window.addEventListener('scroll', () => {
|
3
|
+
if (pageYOffset > 200) {
|
4
|
+
alertbar.style.display = 'block'
|
5
|
+
} else {
|
6
|
+
alertbar.style.display = 'none'
|
7
|
+
}
|
8
|
+
})
|
data/assets/js/X-letter.js
CHANGED
@@ -1,359 +1,359 @@
|
|
1
|
-
---
|
2
|
-
---
|
3
|
-
const getScript=document.currentScript
|
4
|
-
const letterLen = getScript.dataset.letter
|
5
|
-
|
6
|
-
let errorMsg = document.querySelector('.errorMsg')
|
7
|
-
let wordCount = document.querySelector('.wordCount')
|
8
|
-
let main = document.querySelector('.main')
|
9
|
-
|
10
|
-
const params = new URLSearchParams(window.location.search)
|
11
|
-
let serachValue = params.get('search')
|
12
|
-
let prefixValue = params.get('prefix')
|
13
|
-
let containsValue = params.get('contains')
|
14
|
-
let suffixValue = params.get('suffix')
|
15
|
-
let lengthValue = params.get('length')
|
16
|
-
let dictonary = params.get('dictonary')
|
17
|
-
|
18
|
-
let tab_container = document.querySelector('.tab_container')
|
19
|
-
|
20
|
-
let txtBox = document.querySelector('.txtBox')
|
21
|
-
txtBox.value = serachValue
|
22
|
-
|
23
|
-
var theSelect = document.getElementById('select_dropDown')
|
24
|
-
document.querySelector('.select_dropDown2').value = dictonary
|
25
|
-
|
26
|
-
const getData = async (serachValue) => {
|
27
|
-
try {
|
28
|
-
main.innerHTML = `<div class="loader">
|
29
|
-
<img src='/assets/images/loading.gif'>
|
30
|
-
</div>`
|
31
|
-
const response = await fetch(
|
32
|
-
`/.netlify/functions/getWords?name=${serachValue}`
|
33
|
-
)
|
34
|
-
const data = await response.json()
|
35
|
-
main.innerHTML = ''
|
36
|
-
x_with_letters(data)
|
37
|
-
} catch (error) {
|
38
|
-
console.log(error)
|
39
|
-
}
|
40
|
-
}
|
41
|
-
// calling function
|
42
|
-
getData(serachValue.toLowerCase())
|
43
|
-
|
44
|
-
function x_with_letters(data) {
|
45
|
-
if (typeof data === 'string') {
|
46
|
-
errorMsg.innerHTML = 'No words found'
|
47
|
-
wordCount.innerHTML = `<strong> 0 words with letters ${serachValue.split(
|
48
|
-
''
|
49
|
-
)}</strong>`
|
50
|
-
} else {
|
51
|
-
let newWordsLength = 0
|
52
|
-
let filterData = ''
|
53
|
-
|
54
|
-
|
55
|
-
if (letterLen) {
|
56
|
-
filterData = data.filter((item) => item.length == letterLen)
|
57
|
-
}
|
58
|
-
|
59
|
-
|
60
|
-
if (prefixValue) {
|
61
|
-
filterData = filterData.filter((item2) =>
|
62
|
-
item2.startsWith(prefixValue.toLowerCase())
|
63
|
-
)
|
64
|
-
startsWith.classList.add('tick')
|
65
|
-
startsWith.value = prefixValue
|
66
|
-
}
|
67
|
-
if (containsValue) {
|
68
|
-
filterData = filterData.filter((item) =>
|
69
|
-
item.includes(containsValue.toLowerCase())
|
70
|
-
)
|
71
|
-
mustInclude.classList.add('tick')
|
72
|
-
mustInclude.value = containsValue
|
73
|
-
}
|
74
|
-
if (suffixValue) {
|
75
|
-
filterData = filterData.filter((item) =>
|
76
|
-
item.endsWith(suffixValue.toLowerCase())
|
77
|
-
)
|
78
|
-
endsWith.classList.add('tick')
|
79
|
-
endsWith.value = suffixValue
|
80
|
-
}
|
81
|
-
|
82
|
-
if (filterData.length === 0) {
|
83
|
-
main.innerHTML += ''
|
84
|
-
errorMsg.innerHTML = 'No words Found with this length'
|
85
|
-
} else {
|
86
|
-
// sort eventlistener
|
87
|
-
theSelect.addEventListener('change', () => {
|
88
|
-
sortValue = theSelect[theSelect.selectedIndex].text
|
89
|
-
if (sortValue == 'Z-A') {
|
90
|
-
sortBool = true
|
91
|
-
sortby(sortBool, filterData, itemLength)
|
92
|
-
} else {
|
93
|
-
sortBool = false
|
94
|
-
sortby(sortBool, filterData, itemLength)
|
95
|
-
}
|
96
|
-
if (sortValue == 'Points') {
|
97
|
-
sortBool = true
|
98
|
-
sortPointsby(sortBool, filterData, itemLength)
|
99
|
-
}
|
100
|
-
})
|
101
|
-
|
102
|
-
newWordsLength += filterData.length
|
103
|
-
let itemLength = ''
|
104
|
-
const result = filterData.map((item) => {
|
105
|
-
itemLength = item.length
|
106
|
-
let ScrabbleLetterScore = ScrabbleScore()
|
107
|
-
sum = 0
|
108
|
-
item = item.toLowerCase()
|
109
|
-
for (let i = 0; i < item.length; i++) {
|
110
|
-
sum += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
|
111
|
-
}
|
112
|
-
wordLength.value = itemLength
|
113
|
-
return `<a class="anchor__style" title="Lookup python in Dictionary" target="_blank" href="/word-meaning?search=${item}">
|
114
|
-
<li>${item}
|
115
|
-
<span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
|
116
|
-
</li></a>`
|
117
|
-
})
|
118
|
-
|
119
|
-
tab_container.innerHTML += `
|
120
|
-
<a href="#${itemLength}">
|
121
|
-
<input type="button" value="${itemLength} Letter" id="Tab${itemLength}" onclick="addFilter(${itemLength})"
|
122
|
-
class="tab_link">
|
123
|
-
</a>
|
124
|
-
`
|
125
|
-
|
126
|
-
let tabs = document.getElementsByClassName('tab_link')
|
127
|
-
tabs[0] ? tabs[0].classList.add('active-tab') : ''
|
128
|
-
|
129
|
-
main.innerHTML += `
|
130
|
-
<div class="allGroupWords">
|
131
|
-
<div class="wordListHeading">
|
132
|
-
<h3 class="lead">${itemLength} Letter Words</h3>
|
133
|
-
</div>
|
134
|
-
<div class="wordList">
|
135
|
-
<ul class="ul list-unstyled">
|
136
|
-
${result.join('')}
|
137
|
-
</ul>
|
138
|
-
</div>
|
139
|
-
</div>
|
140
|
-
`
|
141
|
-
}
|
142
|
-
wordCount.innerHTML = `<strong>${newWordsLength} words with letters ${serachValue.split(
|
143
|
-
''
|
144
|
-
)}</strong>`
|
145
|
-
}
|
146
|
-
}
|
147
|
-
|
148
|
-
//Handling of filter counter in advanced filter
|
149
|
-
function addFilterCount() {
|
150
|
-
let filter_val = document.getElementsByClassName('filter_val')
|
151
|
-
let filter = document.querySelector('.filter_count')
|
152
|
-
let filter_count = 0
|
153
|
-
|
154
|
-
filter_val[0].value = prefixValue
|
155
|
-
filter_val[1].value = containsValue
|
156
|
-
filter_val[2].value = suffixValue
|
157
|
-
filter_val[3].value = lengthValue
|
158
|
-
|
159
|
-
for (var i = 0; i < 4; i++) {
|
160
|
-
if (filter_val[i].value != '') {
|
161
|
-
filter_count += 1
|
162
|
-
}
|
163
|
-
if (filter_count === 0) {
|
164
|
-
filter.style.display = 'none'
|
165
|
-
} else {
|
166
|
-
filter.style.display = 'inline-block'
|
167
|
-
}
|
168
|
-
|
169
|
-
filter.innerHTML = filter_count
|
170
|
-
}
|
171
|
-
}
|
172
|
-
addFilterCount()
|
173
|
-
|
174
|
-
// sorting by points
|
175
|
-
function sortPointsby(sortValue, data, i) {
|
176
|
-
if (sortValue) {
|
177
|
-
main.innerHTML = ''
|
178
|
-
let newArray = []
|
179
|
-
data.map((item) => {
|
180
|
-
let ScrabbleLetterScore = ScrabbleScore()
|
181
|
-
let points = 0
|
182
|
-
item = item.toLowerCase()
|
183
|
-
for (let i = 0; i < item.length; i++) {
|
184
|
-
points += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
|
185
|
-
}
|
186
|
-
const value = {
|
187
|
-
words: item,
|
188
|
-
points: points,
|
189
|
-
}
|
190
|
-
newArray.push(value)
|
191
|
-
newArray.sort(function (a, b) {
|
192
|
-
return b.points - a.points
|
193
|
-
})
|
194
|
-
})
|
195
|
-
const result = newArray.map((item) => {
|
196
|
-
return `<a class="anchor__style" title="Lookup python in Dictionary" target="_blank" href="/word-meaning?search=${item.words}">
|
197
|
-
<li>${item.words}
|
198
|
-
<span class="points" value="${item.points}" style="position:relative; top:4px; font-size:12px"> ${item.points}</span>
|
199
|
-
</li></a>`
|
200
|
-
})
|
201
|
-
|
202
|
-
main.innerHTML += `
|
203
|
-
<div class="allGroupWords wordlistContainer" id="alpha_${i}">
|
204
|
-
<div class="wordListHeading">
|
205
|
-
<h3 class="lead">${i} Letter Words</h3>
|
206
|
-
</div>
|
207
|
-
<div class="wordList">
|
208
|
-
<ul class="ul list-unstyled">
|
209
|
-
${result.join('')}
|
210
|
-
</ul>
|
211
|
-
</div>
|
212
|
-
</div>
|
213
|
-
`
|
214
|
-
}
|
215
|
-
}
|
216
|
-
|
217
|
-
// sort by aplhabets
|
218
|
-
function sortby(sortBool, data, i) {
|
219
|
-
if (sortBool) {
|
220
|
-
main.innerHTML = ''
|
221
|
-
data.reverse()
|
222
|
-
const result = data.map((item) => {
|
223
|
-
let ScrabbleLetterScore = ScrabbleScore()
|
224
|
-
let sum = 0
|
225
|
-
item = item.toLowerCase()
|
226
|
-
for (let i = 0; i < item.length; i++) {
|
227
|
-
sum += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
|
228
|
-
}
|
229
|
-
return `<a class="anchor__style" title="Lookup python in Dictionary" target="_blank" href="/word-meaning?search=${item}">
|
230
|
-
<li>${item}
|
231
|
-
<span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
|
232
|
-
</li></a>`
|
233
|
-
})
|
234
|
-
|
235
|
-
main.innerHTML += `
|
236
|
-
<div class="allGroupWords wordlistContainer" id="alpha_${i}">
|
237
|
-
<div class="wordListHeading">
|
238
|
-
<h3 class="lead">${i} Letter Words</h3>
|
239
|
-
</div>
|
240
|
-
<div class="wordList">
|
241
|
-
<ul class="ul list-unstyled">
|
242
|
-
${result.join('')}
|
243
|
-
</ul>
|
244
|
-
</div>
|
245
|
-
</div>
|
246
|
-
|
247
|
-
`
|
248
|
-
} else {
|
249
|
-
main.innerHTML = ''
|
250
|
-
data.sort()
|
251
|
-
const result = data.map((item) => {
|
252
|
-
let ScrabbleLetterScore = ScrabbleScore()
|
253
|
-
let sum = 0
|
254
|
-
item = item.toLowerCase()
|
255
|
-
for (let i = 0; i < item.length; i++) {
|
256
|
-
sum += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
|
257
|
-
}
|
258
|
-
return `<a class="anchor__style" title="Lookup python in Dictionary" target="_blank" href="/word-meaning?search=${item}">
|
259
|
-
<li>${item}
|
260
|
-
<span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
|
261
|
-
</li></a>`
|
262
|
-
})
|
263
|
-
|
264
|
-
main.innerHTML += `
|
265
|
-
<div class="allGroupWords wordlistContainer" id="alpha_${i}">
|
266
|
-
<div class="wordListHeading">
|
267
|
-
<h3 class="lead">${i} Letter Words</h3>
|
268
|
-
</div>
|
269
|
-
<div class="wordList">
|
270
|
-
<ul class="ul list-unstyled">
|
271
|
-
${result.join('')}
|
272
|
-
</ul>
|
273
|
-
</div>
|
274
|
-
</div>
|
275
|
-
|
276
|
-
`
|
277
|
-
}
|
278
|
-
}
|
279
|
-
|
280
|
-
// Implement Active class
|
281
|
-
const addFilter = () => {
|
282
|
-
let tabs = document.getElementsByClassName('tab_link')
|
283
|
-
tabs[0] ? tabs[0].classList.add('active-tab') : ''
|
284
|
-
|
285
|
-
Array.from(tabs).map((item) => {
|
286
|
-
item.classList.remove('active-tab')
|
287
|
-
})
|
288
|
-
main.innerHTML += ``
|
289
|
-
let activeLetter = event.target
|
290
|
-
// console.log(activeLetter)
|
291
|
-
activeLetter.classList.add('active-tab')
|
292
|
-
}
|
293
|
-
|
294
|
-
// Scrabble Point Counts
|
295
|
-
const ScrabbleScore = () => {
|
296
|
-
let twl06_sowpods = {
|
297
|
-
a: 1,
|
298
|
-
e: 1,
|
299
|
-
i: 1,
|
300
|
-
o: 1,
|
301
|
-
u: 1,
|
302
|
-
l: 1,
|
303
|
-
n: 1,
|
304
|
-
r: 1,
|
305
|
-
s: 1,
|
306
|
-
t: 1,
|
307
|
-
d: 2,
|
308
|
-
g: 2,
|
309
|
-
b: 3,
|
310
|
-
c: 3,
|
311
|
-
m: 3,
|
312
|
-
p: 3,
|
313
|
-
f: 4,
|
314
|
-
h: 4,
|
315
|
-
v: 4,
|
316
|
-
w: 4,
|
317
|
-
y: 4,
|
318
|
-
k: 5,
|
319
|
-
j: 8,
|
320
|
-
x: 8,
|
321
|
-
q: 10,
|
322
|
-
z: 10,
|
323
|
-
}
|
324
|
-
|
325
|
-
let wwfScore = {
|
326
|
-
a: 1,
|
327
|
-
b: 4,
|
328
|
-
c: 4,
|
329
|
-
d: 2,
|
330
|
-
e: 1,
|
331
|
-
f: 4,
|
332
|
-
g: 3,
|
333
|
-
h: 3,
|
334
|
-
i: 1,
|
335
|
-
j: 10,
|
336
|
-
k: 5,
|
337
|
-
l: 2,
|
338
|
-
m: 4,
|
339
|
-
n: 2,
|
340
|
-
o: 1,
|
341
|
-
p: 4,
|
342
|
-
q: 10,
|
343
|
-
r: 1,
|
344
|
-
s: 1,
|
345
|
-
t: 1,
|
346
|
-
u: 2,
|
347
|
-
v: 5,
|
348
|
-
w: 4,
|
349
|
-
x: 8,
|
350
|
-
y: 3,
|
351
|
-
z: 10,
|
352
|
-
}
|
353
|
-
|
354
|
-
if (dictonary === 'wwf') {
|
355
|
-
return wwfScore
|
356
|
-
} else {
|
357
|
-
return twl06_sowpods
|
358
|
-
}
|
359
|
-
}
|
1
|
+
---
|
2
|
+
---
|
3
|
+
const getScript=document.currentScript
|
4
|
+
const letterLen = getScript.dataset.letter
|
5
|
+
|
6
|
+
let errorMsg = document.querySelector('.errorMsg')
|
7
|
+
let wordCount = document.querySelector('.wordCount')
|
8
|
+
let main = document.querySelector('.main')
|
9
|
+
|
10
|
+
const params = new URLSearchParams(window.location.search)
|
11
|
+
let serachValue = params.get('search')
|
12
|
+
let prefixValue = params.get('prefix')
|
13
|
+
let containsValue = params.get('contains')
|
14
|
+
let suffixValue = params.get('suffix')
|
15
|
+
let lengthValue = params.get('length')
|
16
|
+
let dictonary = params.get('dictonary')
|
17
|
+
|
18
|
+
let tab_container = document.querySelector('.tab_container')
|
19
|
+
|
20
|
+
let txtBox = document.querySelector('.txtBox')
|
21
|
+
txtBox.value = serachValue
|
22
|
+
|
23
|
+
var theSelect = document.getElementById('select_dropDown')
|
24
|
+
document.querySelector('.select_dropDown2').value = dictonary
|
25
|
+
|
26
|
+
const getData = async (serachValue) => {
|
27
|
+
try {
|
28
|
+
main.innerHTML = `<div class="loader">
|
29
|
+
<img src='/assets/images/loading.gif'>
|
30
|
+
</div>`
|
31
|
+
const response = await fetch(
|
32
|
+
`/.netlify/functions/getWords?name=${serachValue}`
|
33
|
+
)
|
34
|
+
const data = await response.json()
|
35
|
+
main.innerHTML = ''
|
36
|
+
x_with_letters(data)
|
37
|
+
} catch (error) {
|
38
|
+
console.log(error)
|
39
|
+
}
|
40
|
+
}
|
41
|
+
// calling function
|
42
|
+
getData(serachValue.toLowerCase())
|
43
|
+
|
44
|
+
function x_with_letters(data) {
|
45
|
+
if (typeof data === 'string') {
|
46
|
+
errorMsg.innerHTML = 'No words found'
|
47
|
+
wordCount.innerHTML = `<strong> 0 words with letters ${serachValue.split(
|
48
|
+
''
|
49
|
+
)}</strong>`
|
50
|
+
} else {
|
51
|
+
let newWordsLength = 0
|
52
|
+
let filterData = ''
|
53
|
+
|
54
|
+
|
55
|
+
if (letterLen) {
|
56
|
+
filterData = data.filter((item) => item.length == letterLen)
|
57
|
+
}
|
58
|
+
|
59
|
+
|
60
|
+
if (prefixValue) {
|
61
|
+
filterData = filterData.filter((item2) =>
|
62
|
+
item2.startsWith(prefixValue.toLowerCase())
|
63
|
+
)
|
64
|
+
startsWith.classList.add('tick')
|
65
|
+
startsWith.value = prefixValue
|
66
|
+
}
|
67
|
+
if (containsValue) {
|
68
|
+
filterData = filterData.filter((item) =>
|
69
|
+
item.includes(containsValue.toLowerCase())
|
70
|
+
)
|
71
|
+
mustInclude.classList.add('tick')
|
72
|
+
mustInclude.value = containsValue
|
73
|
+
}
|
74
|
+
if (suffixValue) {
|
75
|
+
filterData = filterData.filter((item) =>
|
76
|
+
item.endsWith(suffixValue.toLowerCase())
|
77
|
+
)
|
78
|
+
endsWith.classList.add('tick')
|
79
|
+
endsWith.value = suffixValue
|
80
|
+
}
|
81
|
+
|
82
|
+
if (filterData.length === 0) {
|
83
|
+
main.innerHTML += ''
|
84
|
+
errorMsg.innerHTML = 'No words Found with this length'
|
85
|
+
} else {
|
86
|
+
// sort eventlistener
|
87
|
+
theSelect.addEventListener('change', () => {
|
88
|
+
sortValue = theSelect[theSelect.selectedIndex].text
|
89
|
+
if (sortValue == 'Z-A') {
|
90
|
+
sortBool = true
|
91
|
+
sortby(sortBool, filterData, itemLength)
|
92
|
+
} else {
|
93
|
+
sortBool = false
|
94
|
+
sortby(sortBool, filterData, itemLength)
|
95
|
+
}
|
96
|
+
if (sortValue == 'Points') {
|
97
|
+
sortBool = true
|
98
|
+
sortPointsby(sortBool, filterData, itemLength)
|
99
|
+
}
|
100
|
+
})
|
101
|
+
|
102
|
+
newWordsLength += filterData.length
|
103
|
+
let itemLength = ''
|
104
|
+
const result = filterData.map((item) => {
|
105
|
+
itemLength = item.length
|
106
|
+
let ScrabbleLetterScore = ScrabbleScore()
|
107
|
+
sum = 0
|
108
|
+
item = item.toLowerCase()
|
109
|
+
for (let i = 0; i < item.length; i++) {
|
110
|
+
sum += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
|
111
|
+
}
|
112
|
+
wordLength.value = itemLength
|
113
|
+
return `<a class="anchor__style" title="Lookup python in Dictionary" target="_blank" href="/word-meaning?search=${item}">
|
114
|
+
<li>${item}
|
115
|
+
<span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
|
116
|
+
</li></a>`
|
117
|
+
})
|
118
|
+
|
119
|
+
tab_container.innerHTML += `
|
120
|
+
<a href="#${itemLength}">
|
121
|
+
<input type="button" value="${itemLength} Letter" id="Tab${itemLength}" onclick="addFilter(${itemLength})"
|
122
|
+
class="tab_link">
|
123
|
+
</a>
|
124
|
+
`
|
125
|
+
|
126
|
+
let tabs = document.getElementsByClassName('tab_link')
|
127
|
+
tabs[0] ? tabs[0].classList.add('active-tab') : ''
|
128
|
+
|
129
|
+
main.innerHTML += `
|
130
|
+
<div class="allGroupWords">
|
131
|
+
<div class="wordListHeading">
|
132
|
+
<h3 class="lead">${itemLength} Letter Words</h3>
|
133
|
+
</div>
|
134
|
+
<div class="wordList">
|
135
|
+
<ul class="ul list-unstyled">
|
136
|
+
${result.join('')}
|
137
|
+
</ul>
|
138
|
+
</div>
|
139
|
+
</div>
|
140
|
+
`
|
141
|
+
}
|
142
|
+
wordCount.innerHTML = `<strong>${newWordsLength} words with letters ${serachValue.split(
|
143
|
+
''
|
144
|
+
)}</strong>`
|
145
|
+
}
|
146
|
+
}
|
147
|
+
|
148
|
+
//Handling of filter counter in advanced filter
|
149
|
+
function addFilterCount() {
|
150
|
+
let filter_val = document.getElementsByClassName('filter_val')
|
151
|
+
let filter = document.querySelector('.filter_count')
|
152
|
+
let filter_count = 0
|
153
|
+
|
154
|
+
filter_val[0].value = prefixValue
|
155
|
+
filter_val[1].value = containsValue
|
156
|
+
filter_val[2].value = suffixValue
|
157
|
+
filter_val[3].value = lengthValue
|
158
|
+
|
159
|
+
for (var i = 0; i < 4; i++) {
|
160
|
+
if (filter_val[i].value != '') {
|
161
|
+
filter_count += 1
|
162
|
+
}
|
163
|
+
if (filter_count === 0) {
|
164
|
+
filter.style.display = 'none'
|
165
|
+
} else {
|
166
|
+
filter.style.display = 'inline-block'
|
167
|
+
}
|
168
|
+
|
169
|
+
filter.innerHTML = filter_count
|
170
|
+
}
|
171
|
+
}
|
172
|
+
addFilterCount()
|
173
|
+
|
174
|
+
// sorting by points
|
175
|
+
function sortPointsby(sortValue, data, i) {
|
176
|
+
if (sortValue) {
|
177
|
+
main.innerHTML = ''
|
178
|
+
let newArray = []
|
179
|
+
data.map((item) => {
|
180
|
+
let ScrabbleLetterScore = ScrabbleScore()
|
181
|
+
let points = 0
|
182
|
+
item = item.toLowerCase()
|
183
|
+
for (let i = 0; i < item.length; i++) {
|
184
|
+
points += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
|
185
|
+
}
|
186
|
+
const value = {
|
187
|
+
words: item,
|
188
|
+
points: points,
|
189
|
+
}
|
190
|
+
newArray.push(value)
|
191
|
+
newArray.sort(function (a, b) {
|
192
|
+
return b.points - a.points
|
193
|
+
})
|
194
|
+
})
|
195
|
+
const result = newArray.map((item) => {
|
196
|
+
return `<a class="anchor__style" title="Lookup python in Dictionary" target="_blank" href="/word-meaning?search=${item.words}">
|
197
|
+
<li>${item.words}
|
198
|
+
<span class="points" value="${item.points}" style="position:relative; top:4px; font-size:12px"> ${item.points}</span>
|
199
|
+
</li></a>`
|
200
|
+
})
|
201
|
+
|
202
|
+
main.innerHTML += `
|
203
|
+
<div class="allGroupWords wordlistContainer" id="alpha_${i}">
|
204
|
+
<div class="wordListHeading">
|
205
|
+
<h3 class="lead">${i} Letter Words</h3>
|
206
|
+
</div>
|
207
|
+
<div class="wordList">
|
208
|
+
<ul class="ul list-unstyled">
|
209
|
+
${result.join('')}
|
210
|
+
</ul>
|
211
|
+
</div>
|
212
|
+
</div>
|
213
|
+
`
|
214
|
+
}
|
215
|
+
}
|
216
|
+
|
217
|
+
// sort by aplhabets
|
218
|
+
function sortby(sortBool, data, i) {
|
219
|
+
if (sortBool) {
|
220
|
+
main.innerHTML = ''
|
221
|
+
data.reverse()
|
222
|
+
const result = data.map((item) => {
|
223
|
+
let ScrabbleLetterScore = ScrabbleScore()
|
224
|
+
let sum = 0
|
225
|
+
item = item.toLowerCase()
|
226
|
+
for (let i = 0; i < item.length; i++) {
|
227
|
+
sum += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
|
228
|
+
}
|
229
|
+
return `<a class="anchor__style" title="Lookup python in Dictionary" target="_blank" href="/word-meaning?search=${item}">
|
230
|
+
<li>${item}
|
231
|
+
<span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
|
232
|
+
</li></a>`
|
233
|
+
})
|
234
|
+
|
235
|
+
main.innerHTML += `
|
236
|
+
<div class="allGroupWords wordlistContainer" id="alpha_${i}">
|
237
|
+
<div class="wordListHeading">
|
238
|
+
<h3 class="lead">${i} Letter Words</h3>
|
239
|
+
</div>
|
240
|
+
<div class="wordList">
|
241
|
+
<ul class="ul list-unstyled">
|
242
|
+
${result.join('')}
|
243
|
+
</ul>
|
244
|
+
</div>
|
245
|
+
</div>
|
246
|
+
|
247
|
+
`
|
248
|
+
} else {
|
249
|
+
main.innerHTML = ''
|
250
|
+
data.sort()
|
251
|
+
const result = data.map((item) => {
|
252
|
+
let ScrabbleLetterScore = ScrabbleScore()
|
253
|
+
let sum = 0
|
254
|
+
item = item.toLowerCase()
|
255
|
+
for (let i = 0; i < item.length; i++) {
|
256
|
+
sum += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
|
257
|
+
}
|
258
|
+
return `<a class="anchor__style" title="Lookup python in Dictionary" target="_blank" href="/word-meaning?search=${item}">
|
259
|
+
<li>${item}
|
260
|
+
<span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px"> ${sum}</span>
|
261
|
+
</li></a>`
|
262
|
+
})
|
263
|
+
|
264
|
+
main.innerHTML += `
|
265
|
+
<div class="allGroupWords wordlistContainer" id="alpha_${i}">
|
266
|
+
<div class="wordListHeading">
|
267
|
+
<h3 class="lead">${i} Letter Words</h3>
|
268
|
+
</div>
|
269
|
+
<div class="wordList">
|
270
|
+
<ul class="ul list-unstyled">
|
271
|
+
${result.join('')}
|
272
|
+
</ul>
|
273
|
+
</div>
|
274
|
+
</div>
|
275
|
+
|
276
|
+
`
|
277
|
+
}
|
278
|
+
}
|
279
|
+
|
280
|
+
// Implement Active class
|
281
|
+
const addFilter = () => {
|
282
|
+
let tabs = document.getElementsByClassName('tab_link')
|
283
|
+
tabs[0] ? tabs[0].classList.add('active-tab') : ''
|
284
|
+
|
285
|
+
Array.from(tabs).map((item) => {
|
286
|
+
item.classList.remove('active-tab')
|
287
|
+
})
|
288
|
+
main.innerHTML += ``
|
289
|
+
let activeLetter = event.target
|
290
|
+
// console.log(activeLetter)
|
291
|
+
activeLetter.classList.add('active-tab')
|
292
|
+
}
|
293
|
+
|
294
|
+
// Scrabble Point Counts
|
295
|
+
const ScrabbleScore = () => {
|
296
|
+
let twl06_sowpods = {
|
297
|
+
a: 1,
|
298
|
+
e: 1,
|
299
|
+
i: 1,
|
300
|
+
o: 1,
|
301
|
+
u: 1,
|
302
|
+
l: 1,
|
303
|
+
n: 1,
|
304
|
+
r: 1,
|
305
|
+
s: 1,
|
306
|
+
t: 1,
|
307
|
+
d: 2,
|
308
|
+
g: 2,
|
309
|
+
b: 3,
|
310
|
+
c: 3,
|
311
|
+
m: 3,
|
312
|
+
p: 3,
|
313
|
+
f: 4,
|
314
|
+
h: 4,
|
315
|
+
v: 4,
|
316
|
+
w: 4,
|
317
|
+
y: 4,
|
318
|
+
k: 5,
|
319
|
+
j: 8,
|
320
|
+
x: 8,
|
321
|
+
q: 10,
|
322
|
+
z: 10,
|
323
|
+
}
|
324
|
+
|
325
|
+
let wwfScore = {
|
326
|
+
a: 1,
|
327
|
+
b: 4,
|
328
|
+
c: 4,
|
329
|
+
d: 2,
|
330
|
+
e: 1,
|
331
|
+
f: 4,
|
332
|
+
g: 3,
|
333
|
+
h: 3,
|
334
|
+
i: 1,
|
335
|
+
j: 10,
|
336
|
+
k: 5,
|
337
|
+
l: 2,
|
338
|
+
m: 4,
|
339
|
+
n: 2,
|
340
|
+
o: 1,
|
341
|
+
p: 4,
|
342
|
+
q: 10,
|
343
|
+
r: 1,
|
344
|
+
s: 1,
|
345
|
+
t: 1,
|
346
|
+
u: 2,
|
347
|
+
v: 5,
|
348
|
+
w: 4,
|
349
|
+
x: 8,
|
350
|
+
y: 3,
|
351
|
+
z: 10,
|
352
|
+
}
|
353
|
+
|
354
|
+
if (dictonary === 'wwf') {
|
355
|
+
return wwfScore
|
356
|
+
} else {
|
357
|
+
return twl06_sowpods
|
358
|
+
}
|
359
|
+
}
|