word-games-theme 1.7.0 → 1.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (254) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +0 -0
  3. data/README.md +0 -0
  4. data/_data/WordPointTables.json +0 -0
  5. data/_data/autogenerated_data.json +0 -0
  6. data/_data/blog/alertbar.yml +0 -0
  7. data/_data/blog/blog.yml +0 -0
  8. data/_data/blog/nav.json +0 -0
  9. data/_data/blog/popularUrls.json +0 -0
  10. data/_data/blog/share.yml +0 -0
  11. data/_data/content/en/pooja.json +0 -0
  12. data/_data/content/en/python.json +0 -0
  13. data/_data/content/en/react.json +0 -0
  14. data/_data/footer/en/data.json +0 -0
  15. data/_data/footer/networksites.json +0 -0
  16. data/_data/header/en/data.json +0 -0
  17. data/_data/repeatLetter/en/repeat-letters.json +0 -0
  18. data/_data/theme/colors.json +0 -0
  19. data/_data/wordfinderstrategy/en/how-to-use-5-letter-word-finder-to-score-high-in-scrabble-words-with-friends.json +0 -0
  20. data/_data/wordgames/ar/four_letter_word_finder.json +0 -0
  21. data/_data/wordgames/da/four_letter_word_finder.json +0 -0
  22. data/_data/wordgames/de/four_letter_word_finder.json +0 -0
  23. data/_data/wordgames/en/4_letter_words_with_these_letters_and_a_blank.json +0 -0
  24. data/_data/wordgames/en/anagram_word_finder.json +0 -0
  25. data/_data/wordgames/en/eight_letter_word_finder.json +0 -0
  26. data/_data/wordgames/en/eleven_letter_word_finder.json +0 -0
  27. data/_data/wordgames/en/feature_certain_positions.json +0 -0
  28. data/_data/wordgames/en/find-words-that-start-with-the-letters.json +0 -0
  29. data/_data/wordgames/en/five_letter_word_finder.json +0 -0
  30. data/_data/wordgames/en/four_letter_word_finder.json +0 -0
  31. data/_data/wordgames/en/french-word-unscrambler.json +0 -0
  32. data/_data/wordgames/en/german-word-unscrambler.json +0 -0
  33. data/_data/wordgames/en/italian-word-unscrambler.json +0 -0
  34. data/_data/wordgames/en/jumble_word_finder.json +0 -0
  35. data/_data/wordgames/en/lexical_word_finder.json +0 -0
  36. data/_data/wordgames/en/multiple-word-anagram-solver.json +0 -0
  37. data/_data/wordgames/en/nine_letter_word_finder.json +0 -0
  38. data/_data/wordgames/en/root.json +0 -0
  39. data/_data/wordgames/en/scrabble_word_finder_cheat.json +0 -0
  40. data/_data/wordgames/en/seven_letter_word_finder.json +0 -0
  41. data/_data/wordgames/en/six_letter_word_finder.json +0 -0
  42. data/_data/wordgames/en/spanish-word-unscrambler.json +0 -0
  43. data/_data/wordgames/en/ten_letter_word_finder.json +0 -0
  44. data/_data/wordgames/en/thirteen_letter_word_finder.json +0 -0
  45. data/_data/wordgames/en/three_letter_word_finder.json +0 -0
  46. data/_data/wordgames/en/twelve_letter_word_finder.json +0 -0
  47. data/_data/wordgames/en/two_letter_word_finder.json +0 -0
  48. data/_data/wordgames/en/unscramble_letters_to_make_words.json +0 -0
  49. data/_data/wordgames/en/unscramble_words_and_jumble_solver.json +0 -0
  50. data/_data/wordgames/en/word-game-generator-online.json +0 -0
  51. data/_data/wordgames/en/word-game-play.json +0 -0
  52. data/_data/wordgames/en/word-meaning.json +0 -0
  53. data/_data/wordgames/en/words_with_friends_word_finder.json +0 -0
  54. data/_data/wordgames/es/four_letter_word_finder.json +0 -0
  55. data/_data/wordgames/fr/four_letter_word_finder.json +0 -0
  56. data/_data/wordgames/hi/four_letter_word_finder.json +0 -0
  57. data/_data/wordgames/id/four_letter_word_finder.json +0 -0
  58. data/_data/wordgames/it/four_letter_word_finder.json +0 -0
  59. data/_data/wordgames/ja/four_letter_word_finder.json +0 -0
  60. data/_data/wordgames/ko/four_letter_word_finder.json +0 -0
  61. data/_data/wordgames/nl/four_letter_word_finder.json +0 -0
  62. data/_data/wordgames/pl/four_letter_word_finder.json +0 -0
  63. data/_data/wordgames/pt/four_letter_word_finder.json +0 -0
  64. data/_data/wordgames/ru/four_letter_word_finder.json +0 -0
  65. data/_data/wordgames/sv/four_letter_word_finder.json +0 -0
  66. data/_data/wordgames/th/four_letter_word_finder.json +0 -0
  67. data/_data/wordgames/tr/four_letter_word_finder.json +0 -0
  68. data/_data/wordgames/uk/four_letter_word_finder.json +0 -0
  69. data/_data/wordgames/vi/four_letter_word_finder.json +0 -0
  70. data/_data/wordgames/zh/four_letter_word_finder.json +0 -0
  71. data/_data/wordgames/zh-TW/four_letter_word_finder.json +0 -0
  72. data/_data/wordleSolver/en/data.json +0 -0
  73. data/_data/wordleSolver/en/resultData.json +0 -0
  74. data/_data/xyzPagesData/en/unscramble-letters-jumble.json +0 -0
  75. data/_data/xyzPagesData/en/words-with-letters-cheat.json +168 -138
  76. data/_includes/Monumetric/Monumetric.html +0 -0
  77. data/_includes/Rating/rating.html +0 -0
  78. data/_includes/Rating/structureddata.html +0 -0
  79. data/_includes/WordPointTables/table.html +0 -0
  80. data/_includes/adBlocker/adBlocker.html +0 -0
  81. data/_includes/adsense/adsense.html +0 -0
  82. data/_includes/author_bio.html +0 -0
  83. data/_includes/authors/authors.html +0 -0
  84. data/_includes/autogenerated/content.html +0 -0
  85. data/_includes/autogenerated/footer.html +0 -0
  86. data/_includes/cssfile/links.html +0 -0
  87. data/_includes/custom-head.html +0 -0
  88. data/_includes/disqus_comments.html +0 -0
  89. data/_includes/filterWords/index.html +0 -0
  90. data/_includes/find-words-in-certain-positions/words-in-certain-positions.html +0 -0
  91. data/_includes/footer/index.html +0 -0
  92. data/_includes/footer/unqFooter.html +0 -0
  93. data/_includes/google-analytics.html +0 -0
  94. data/_includes/head/index.html +0 -0
  95. data/_includes/header/blogHeader.html +0 -0
  96. data/_includes/header/index.html +0 -0
  97. data/_includes/howto.html +0 -0
  98. data/_includes/languages/languages.html +0 -0
  99. data/_includes/multiple-word-anagram-solver/index.html +138 -85
  100. data/_includes/paginationBlogPage.html +0 -0
  101. data/_includes/paginationPostPage.html +0 -0
  102. data/_includes/postauthorbio.html +0 -0
  103. data/_includes/postbox.html +0 -0
  104. data/_includes/repeat-letters.html +0 -0
  105. data/_includes/script.html +0 -0
  106. data/_includes/section/about.html +0 -0
  107. data/_includes/section/alertbar.html +0 -0
  108. data/_includes/section/blog.html +0 -0
  109. data/_includes/section/commonPage.html +0 -0
  110. data/_includes/section/count.html +0 -0
  111. data/_includes/section/feature.html +1 -1
  112. data/_includes/section/home.html +0 -0
  113. data/_includes/section/home2.html +0 -0
  114. data/_includes/section/news.html +1 -1
  115. data/_includes/section/recent_posts.html +0 -0
  116. data/_includes/section/related_categories_post.html +0 -0
  117. data/_includes/section/wordGroup.html +0 -0
  118. data/_includes/section/xyzGroup.html +0 -0
  119. data/_includes/seo.html +0 -0
  120. data/_includes/share/socialshare.html +0 -0
  121. data/_includes/word-game/word-game-generator-online.html +0 -0
  122. data/_includes/word-game/word-game-play.html +0 -0
  123. data/_includes/wordfinderstrategy/content.html +0 -0
  124. data/_includes/wordle-solver/wordle-solver.html +0 -0
  125. data/_includes/xyzpages/xyz.html +0 -0
  126. data/_includes/xyzpages/xyzFooter.html +0 -0
  127. data/_layouts/allpages.html +0 -0
  128. data/_layouts/autogencontent.html +0 -0
  129. data/_layouts/blank.html +0 -0
  130. data/_layouts/blog.html +0 -0
  131. data/_layouts/categories.html +0 -0
  132. data/_layouts/default.html +0 -0
  133. data/_layouts/disclaimer.html +0 -0
  134. data/_layouts/other-lang-scrabble.html +0 -0
  135. data/_layouts/page.html +0 -0
  136. data/_layouts/page2.html +0 -0
  137. data/_layouts/post.html +0 -0
  138. data/_layouts/privacyPolicy.html +0 -0
  139. data/_layouts/termAndCondition.html +0 -0
  140. data/_layouts/tools.html +0 -0
  141. data/_layouts/wordMeaning.html +0 -0
  142. data/_layouts/xyzpages.html +9 -0
  143. data/assets/css/adBlocker.css +0 -0
  144. data/assets/css/advancedFilter.css +0 -0
  145. data/assets/css/blog.css +0 -0
  146. data/assets/css/bootstrap.min.css +0 -0
  147. data/assets/css/content.css +0 -0
  148. data/assets/css/feature.css +0 -0
  149. data/assets/css/footer.css +0 -0
  150. data/assets/css/game.css +0 -0
  151. data/assets/css/home.css +0 -0
  152. data/assets/css/multiple-word-anagram-solver.css +15 -1
  153. data/assets/css/news.css +0 -0
  154. data/assets/css/style.css +0 -0
  155. data/assets/css/testhome.css +0 -0
  156. data/assets/css/wordGroup.css +0 -0
  157. data/assets/css/wordScrabble.css +0 -0
  158. data/assets/css/wordleSolver.css +0 -0
  159. data/assets/css/wordsInCertainPosition.css +0 -0
  160. data/assets/images/404.svg +0 -0
  161. data/assets/images/Ankita.webp +0 -0
  162. data/assets/images/Anushka.webp +0 -0
  163. data/assets/images/Arjyahi.webp +0 -0
  164. data/assets/images/EMDI - Hurts Like This (feat. Veronica Bravo) [NCS Release].mp3 +0 -0
  165. data/assets/images/Nikita.webp +0 -0
  166. data/assets/images/abp.svg +0 -0
  167. data/assets/images/adblock.svg +1 -266
  168. data/assets/images/alka.webp +0 -0
  169. data/assets/images/angle-arrow-down.svg +1 -43
  170. data/assets/images/balark.jpeg +0 -0
  171. data/assets/images/bg_elements.png +0 -0
  172. data/assets/images/bg_elements.svg +1 -11
  173. data/assets/images/board-game.png +0 -0
  174. data/assets/images/check.svg +1 -3
  175. data/assets/images/close.png +0 -0
  176. data/assets/images/copy.svg +0 -0
  177. data/assets/images/facebook-square.svg +0 -0
  178. data/assets/images/facebook.svg +0 -0
  179. data/assets/images/facebooks.svg +0 -0
  180. data/assets/images/footer.png +0 -0
  181. data/assets/images/footer2-bg.webp +0 -0
  182. data/assets/images/header.svg +0 -0
  183. data/assets/images/hero-media-illustration-dark.svg +0 -0
  184. data/assets/images/hero-media-illustration-light.svg +0 -0
  185. data/assets/images/howto.svg +1 -1
  186. data/assets/images/instagram-square.svg +0 -0
  187. data/assets/images/instagram.svg +1 -1
  188. data/assets/images/keshav.webp +0 -0
  189. data/assets/images/krutika.jpeg +0 -0
  190. data/assets/images/left_obj_01 (1).svg +0 -0
  191. data/assets/images/left_obj_01.png +0 -0
  192. data/assets/images/left_obj_01.svg +0 -0
  193. data/assets/images/left_obj_02.png +0 -0
  194. data/assets/images/linkedin.svg +1 -1
  195. data/assets/images/linkedin2.svg +1 -1
  196. data/assets/images/loading.gif +0 -0
  197. data/assets/images/manpreet-spinner.gif +0 -0
  198. data/assets/images/next.webp +0 -0
  199. data/assets/images/paavan.webp +0 -0
  200. data/assets/images/pallavi.jpeg +0 -0
  201. data/assets/images/prev.webp +0 -0
  202. data/assets/images/rating.webp +0 -0
  203. data/assets/images/ratingStar.png +0 -0
  204. data/assets/images/right.png +0 -0
  205. data/assets/images/right.svg +0 -0
  206. data/assets/images/right2.svg +0 -0
  207. data/assets/images/right3.svg +0 -0
  208. data/assets/images/right_obj_01.png +0 -0
  209. data/assets/images/search.svg +0 -0
  210. data/assets/images/search.webp +0 -0
  211. data/assets/images/siddhika.jpeg +0 -0
  212. data/assets/images/sona.jpeg +0 -0
  213. data/assets/images/star.png +0 -0
  214. data/assets/images/star.svg +0 -0
  215. data/assets/images/test.png +0 -0
  216. data/assets/images/timer.svg +0 -0
  217. data/assets/images/twitter-square.svg +0 -0
  218. data/assets/images/twitter.svg +0 -0
  219. data/assets/images/twitter2.svg +1 -1
  220. data/assets/images/twitters.svg +0 -0
  221. data/assets/images/udit.jpg +0 -0
  222. data/assets/images/uo.svg +0 -0
  223. data/assets/images/whatsapp.svg +0 -0
  224. data/assets/images/window-close.png +0 -0
  225. data/assets/images/window-close.svg +1 -1
  226. data/assets/images/word-games-logo.svg +1 -52
  227. data/assets/images/word-games-logo.webp +0 -0
  228. data/assets/images/wordle.png +0 -0
  229. data/assets/images/wordswithletters-logo.png +0 -0
  230. data/assets/images/yellow_bg.png +0 -0
  231. data/assets/js/TopScroll.js +0 -0
  232. data/assets/js/X-letter-test.js +0 -0
  233. data/assets/js/X-letter.js +0 -0
  234. data/assets/js/adBlocker.js +0 -0
  235. data/assets/js/confetti.js +0 -0
  236. data/assets/js/createWordle.js +0 -0
  237. data/assets/js/default.js +0 -0
  238. data/assets/js/game.js +0 -0
  239. data/assets/js/leftNav.js +0 -0
  240. data/assets/js/multiple-word-anagram-solver.js +322 -80
  241. data/assets/js/noRefreshAds.js +0 -0
  242. data/assets/js/other-lang-wordScrabble.js +0 -0
  243. data/assets/js/repeat-letters.js +0 -0
  244. data/assets/js/resultPage.js +0 -0
  245. data/assets/js/scrabbleDictonary.js +0 -0
  246. data/assets/js/wordScrabble-test.js +0 -0
  247. data/assets/js/wordScrabble.js +0 -0
  248. data/assets/js/wordleSolver.js +0 -0
  249. data/assets/js/wordleSolverResult.js +0 -0
  250. data/assets/js/words-in-certain-positions.js +0 -0
  251. data/assets/js/words-starting-with.js +0 -0
  252. data/assets/js/xyz.js +0 -0
  253. metadata +4 -4
  254. data/assets/images/Resume - Google Docs.pdf +0 -0
@@ -1,52 +1 @@
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
+ <svg xmlns="http://www.w3.org/2000/svg" width="435.496" height="435.496"><path d="M350.914 17.811C336.771 7.082 319.188.637 300.053.637H84.398C37.791.637 0 38.437 0 85.035v215.664C0 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.447V117.739c-.001-50.194-36.665-91.867-84.583-99.928zm-29.193 283.222h7.01v36.529h-8.252v-28.938h-.115l-6.971 3.309-1.396-6.406 9.724-4.494zm-141.497-81.635c-37.638-12.546-52.02-32.838-51.647-54.239 0-33.947 28.773-59.393 73.412-59.393 21.027 0 39.484 5.164 50.539 10.69l-9.582 38.748c-8.129-4.428-23.983-10.337-39.111-10.337-13.655 0-21.391 5.546-21.391 14.382 0 8.864 7.009 13.292 29.137 21.028 34.311 11.8 48.329 29.52 48.702 55.71 0 33.938-26.191 58.666-77.838 58.666-23.61 0-44.638-5.545-58.293-12.928l9.964-39.848c10.318 6.283 31.729 13.293 48.329 13.293 16.964 0 23.973-5.527 23.973-14.756-.002-9.58-5.539-14.006-26.194-21.016zm221.171 114.004c0 37.131-30.197 67.348-67.328 67.348H118.422c-16.706 0-31.977-6.158-43.758-16.256 3.194.373 6.436.604 9.744.604h215.645c46.627 0 84.389-37.791 84.389-84.398V85.045c0-4.456-.449-8.788-1.109-13.053 11.178 12.03 18.072 28.095 18.072 45.756v215.654h-.01z"/></svg>
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/assets/js/default.js CHANGED
File without changes
data/assets/js/game.js CHANGED
File without changes
data/assets/js/leftNav.js CHANGED
File without changes
@@ -2,104 +2,346 @@ const form = document.getElementById("form");
2
2
  const input = document.getElementById("phrase");
3
3
  const selectedDictionary = document.getElementById("dict");
4
4
  const main = document.querySelector("#results");
5
- const contains = document.querySelector("#contains")
6
- const sort_dir = document.querySelector("#sort_dir")
7
- const errorMessage = document.querySelector(".error-message")
5
+ const subResult = document.querySelector("#main-results");
6
+ const contains = document.querySelector("#contains");
7
+ const sort_dir = document.querySelector("#sort_dir");
8
+ const errorMessage = document.querySelector(".error-message");
8
9
  const getScript = document.currentScript;
9
10
  let script = document.currentScript;
10
11
  const siteUrl = getScript.dataset.url;
11
12
  const min_letters = document.querySelector("#min_letters");
13
+ const max_words = document.querySelector("#max_words");
14
+ const limit = document.querySelector("#max_results");
15
+ let loadMore = document.querySelector("#loadMore");
16
+ let lazyLoader = document.getElementById("lazy-loader");
17
+ var resultArr = [];
18
+ var found = new Set();
19
+ var scrabbleWordArr = [];
12
20
  input.focus();
21
+ var wcount = 0;
22
+ var m_words = 0;
23
+
13
24
  function getCombinations(arr, n) {
14
- var i,
15
- j,
16
- k,
17
- elem,
18
- l = arr.length,
19
- childperm,
20
- ret = [];
21
- if (n == 1) {
22
- for (i = 0; i < arr.length; i++) {
23
- for (j = 0; j < arr[i].length; j++) {
24
- ret.push([arr[i][j]]);
25
- }
26
- }
27
- return ret;
28
- } else {
29
- for (i = 0; i < l; i++) {
30
- elem = arr.shift();
31
- for (j = 0; j < elem.length; j++) {
32
- childperm = getCombinations(arr.slice(), n - 1);
33
- for (k = 0; k < childperm.length; k++) {
34
- ret.push([elem[j]].concat(childperm[k]));
35
- }
36
- }
25
+ var i,
26
+ j,
27
+ k,
28
+ elem,
29
+ l = arr.length,
30
+ childperm,
31
+ ret = [];
32
+ if (n == 1) {
33
+ for (i = 0; i < arr.length; i++) {
34
+ for (j = 0; j < arr[i].length; j++) {
35
+ ret.push([arr[i][j]]);
36
+ }
37
+ }
38
+ return ret;
39
+ } else {
40
+ for (i = 0; i < l; i++) {
41
+ elem = arr.shift();
42
+ for (j = 0; j < elem.length; j++) {
43
+ childperm = getCombinations(arr.slice(), n - 1);
44
+ for (k = 0; k < childperm.length; k++) {
45
+ ret.push([elem[j]].concat(childperm[k]));
37
46
  }
38
- return ret;
47
+ }
39
48
  }
49
+ return ret;
50
+ }
40
51
  }
41
52
  let numberOfWords = 3;
42
53
  const getData = async (e) => {
43
- e.preventDefault();
44
- main.innerHTML = `<div class="loader">
54
+ main.innerHTML = "";
55
+ e.preventDefault();
56
+ subResult.innerHTML = `<div class="loader">
45
57
  <img src='/assets/images/loading.gif'>
46
58
  <div style="font-weight:900;font-size:14px" >Finding words - Powered by anagramsolvers.org</div>
47
59
  </div>`;
48
- const response = await fetch(
49
- `/.netlify/functions/getMultipleWords?name=${input.value.toLowerCase()}&selecteddictionary=${selectedDictionary.value
50
- }`
51
- );
52
- const data = await response.json();
53
- main.innerHTML = "";
54
-
55
- let newdata = data
56
- if (newdata.length == []) {
57
- errorMessage.style.display = "block"
58
- document.querySelector(".heading-result").style.display = "none"
59
- } else {
60
- errorMessage.style.display = "none"
61
- document.querySelector(".heading-result").style.display = "block"
62
- if (sort_dir.value === "desc") {
63
- newdata = data.reverse()
64
- }
65
- if (contains.value) {
66
- newdata = newdata.filter((item) =>
67
- item.words.includes(contains.value.toLowerCase())
68
- );
60
+ const response = await fetch(
61
+ `/.netlify/functions/getWords?name=${input.value.toLowerCase()}&selecteddictionary=${
62
+ selectedDictionary.value
63
+ }`
64
+ );
65
+ var data = await response.json();
66
+
67
+ console.time("time taken");
68
+ data = getCombo(data, max_words.value);
69
+ console.timeEnd("time taken");
70
+
71
+ // main.innerHTML = "";
72
+
73
+ // let newdata = data;
74
+
75
+ // if (newdata.length == []) {
76
+ // errorMessage.style.display = "block";
77
+ // document.querySelector(".heading-result").style.display = "none";
78
+ // } else {
79
+ // errorMessage.style.display = "none";
80
+ // document.querySelector(".heading-result").style.display = "block";
81
+ // if (sort_dir.value === "desc") {
82
+ // newdata = data.reverse();
83
+ // }
84
+ // if (contains.value) {
85
+ // newdata = newdata.filter((item) =>
86
+ // item.includes(contains.value.toLowerCase())
87
+ // );
88
+ // }
89
+
90
+ // newdata.map((item) => {
91
+ // let nWords = item.split(" ");
92
+ // var wordHtml = "";
93
+
94
+ // nWords.map((word) => {
95
+ // wordHtml += `<a style="margin:0 5px 0 0; font-size:14px; color:#007bff" title="Lookup ${word} in Dictionary" target="_blank" href="/word-meaning?search=${word}">${word}</a>`;
96
+ // });
97
+ // let html = `<div class="col-lg-3 col-md-4 col-sm-6 col-xs-6">
98
+ // ${wordHtml}
99
+ // </div>`;
100
+ // // main.innerHTML += `${html}`;
101
+ // main.insertAdjacentHTML("beforeend", html);
102
+ // });
103
+ // }
104
+ // resultArr = [];
105
+ // found.clear();
106
+ // scrabbleWordArr = [];
107
+ // console.timeEnd("Process time");
108
+ };
109
+
110
+ form.addEventListener("submit", getData);
111
+
112
+ function arraysEqual(a1, a2) {
113
+ return JSON.stringify(a1.sort()) == JSON.stringify(a2.sort());
114
+ }
115
+
116
+ async function getCombo(arr, m_words) {
117
+ var userValue = input.value.toLowerCase().split("");
118
+ var combinations = [];
119
+ scrabbleWordArr = arr;
120
+ m_words = +max_words.value;
121
+
122
+ arr.map((v) => {
123
+ validWord(v.replace(" ", "").split(""), userValue, v);
124
+ });
125
+
126
+ var combinations = arr.flatMap((v, i) => {
127
+ return arr.slice(i + 1).map((w) => {
128
+ var newWord = v + " " + w;
129
+ validWord(newWord.replace(" ", "").split(""), userValue, newWord);
130
+ return newWord;
131
+ });
132
+ });
133
+ displayUi(resultArr, combinations, userValue, m_words, scrabbleWordArr);
134
+ }
135
+
136
+ const equalsCheck = (a, b) => {
137
+ a = a.sort();
138
+ b = b.sort();
139
+ return JSON.stringify(a) === JSON.stringify(b);
140
+ };
141
+
142
+ function getComboWords(arr1, arr2, userValue) {
143
+ var w_limit = limit.value;
144
+ var count = 0;
145
+ var combArr = [];
146
+
147
+ console.log("inside combo");
148
+
149
+ arr2 = arr2.filter((ele) => {
150
+ var repeat = getMatchedChars(ele, userValue);
151
+ if (repeat) {
152
+ return ele;
153
+ }
154
+ });
155
+
156
+ arr1 = arr1.filter((ele) => {
157
+ var repeat = getRepeatedChars(ele, userValue);
158
+ if (ele.replaceAll(" ", "").length <= userValue.length && repeat) {
159
+ return ele;
160
+ }
161
+ });
162
+
163
+ for (let i = 0; i < arr1.length; i++) {
164
+ var arr_word = arr1[i];
165
+ if (
166
+ arr_word != undefined &&
167
+ arr_word.replaceAll(" ", "").length <
168
+ input.value.replaceAll(" ", "").length
169
+ ) {
170
+ for (let j = 0; j < arr2.length; j++) {
171
+ var arr2_word = arr2[j];
172
+ var nWord = arr_word + " " + arr2_word;
173
+ var nWord_w_space = nWord.replaceAll(" ", "").split("");
174
+ if (
175
+ nWord_w_space.length >= userValue.length &&
176
+ validWord(nWord_w_space, userValue, nWord)
177
+ ) {
178
+ count++;
179
+ // // display([nWord]);
180
+ // blockForFiveMilliSeconds();
181
+ printIndex = resultArr.length;
182
+ // scrabbleWordArr.splice(j, 1);
69
183
  }
70
- let result = []
71
- newdata.map((item) => {
72
- result.push(item.words[0] + " " + item.words[1])
73
- })
74
- result.map((ele, index, self) => {
75
- self.filter((f, j) => {
76
- if (j != index) {
77
- var word = f.toLowerCase().split(" ").reverse().join(" ");
78
- if (ele.includes(word)) {
79
- delete result[j]
80
- }
81
- }
82
- })
83
- })
84
- result.map((item) => {
85
- let word = item.split(" ")[0]
86
- let word2 = item.split(" ")[1]
87
-
88
- let newWord = ""
89
- if (word2 != "undefined") {
90
- newWord = word2
91
- }
92
- let html = `<div class="col-lg-3 col-md-4 col-sm-6 col-xs-6">
93
- <a style="margin:0 5px 0 0; font-size:14px; color:#007bff" title="Lookup ${word} in Dictionary" target="_blank" href="/word-meaning?search=${word}">${word}</a>
94
- <a style="margin:0 5px 0 0; font-size:14px; color:#007bff" title="Lookup ${word2} in Dictionary" target="_blank" href="/word-meaning?search=${word2}">${newWord}</a>
95
- </div>`;
96
- main.innerHTML += `${html}`
97
-
98
- })
184
+ combArr.push(nWord);
185
+ }
186
+ }
187
+ if (count > 0 && count + resultArr.length >= w_limit) {
188
+ break;
189
+ }
190
+ }
191
+
192
+ combArr = combArr.filter((e) => e != undefined);
193
+ return combArr;
194
+ }
195
+
196
+ function validWord(wordT, userValue, ele) {
197
+ var sort_ele = ele.split(" ").sort().join(" ");
198
+ if (arraysEqual(wordT, userValue) && !found.has(sort_ele)) {
199
+ found.add(sort_ele);
200
+ resultArr.push(ele);
201
+ return true;
202
+ }
203
+ return false;
204
+ }
205
+
206
+ const getRepeatedChars = (str, userInput) => {
207
+ var flag = false;
208
+ const charsStr = {};
209
+ const charsUserInput = {};
210
+
211
+ for (const char of str.replace(" ", "")) {
212
+ charsStr[char] = (charsStr[char] || 0) + 1;
213
+ }
214
+ for (const char of userInput.join("")) {
215
+ charsUserInput[char] = (charsUserInput[char] || 0) + 1;
216
+ }
217
+ var str_repeat = Object.entries(charsStr)
218
+ .filter((char) => char[1] > 1)
219
+ .map((char) => char[0]);
220
+
221
+ var input_repeat = Object.entries(charsUserInput)
222
+ .filter((char) => char[1] > 1)
223
+ .map((char) => char[0]);
224
+
225
+ for (let i = 0; i < str_repeat.length; i++) {
226
+ let c = str_repeat[i];
227
+ if (input_repeat.includes(c)) {
228
+ var i_count = charsUserInput[c];
229
+ var str_count = charsStr[c];
230
+ if (str_count <= i_count) {
231
+ flag = true;
232
+ }
233
+ } else {
234
+ flag = false;
235
+ break;
99
236
  }
237
+ }
238
+ return flag;
100
239
  };
101
240
 
241
+ const getMatchedChars = (str, userInput) => {
242
+ var flag = false;
243
+ const charsStr = {};
244
+ const charsUserInput = {};
245
+
246
+ for (const char of str.replace(" ", "")) {
247
+ charsStr[char] = (charsStr[char] || 0) + 1;
248
+ }
249
+ for (const char of userInput.join("")) {
250
+ charsUserInput[char] = (charsUserInput[char] || 0) + 1;
251
+ }
252
+ var str_repeat = Object.entries(charsStr)
253
+ .filter((char) => char[1] >= 1)
254
+ .map((char) => char[0]);
102
255
 
256
+ var input_repeat = Object.entries(charsUserInput)
257
+ .filter((char) => char[1] > 1)
258
+ .map((char) => char[0]);
103
259
 
260
+ for (let i = 0; i < str_repeat.length; i++) {
261
+ let c = str_repeat[i];
262
+ if (userInput.includes(c)) {
263
+ var i_count = charsUserInput[c];
264
+ var str_count = charsStr[c];
265
+ if (str_count <= i_count) {
266
+ flag = true;
267
+ }
268
+ } else {
269
+ flag = false;
270
+ break;
271
+ }
272
+ }
273
+ return flag;
274
+ };
275
+ //n is max word
276
+ async function displayUi(newdata, combinations, userValue, n, wordArr) {
277
+ // console.log("printed for firsTime");
278
+ if (newdata.length == []) {
279
+ if (found.size == 0) {
280
+ errorMessage.style.display = "block";
281
+ document.querySelector(".heading-result").style.display = "none";
282
+ }
283
+ } else {
284
+ errorMessage.style.display = "none";
285
+ document.querySelector(".heading-result").style.display = "block";
286
+ if (sort_dir.value === "desc") {
287
+ newdata = data.reverse();
288
+ }
289
+ if (contains.value) {
290
+ newdata = newdata.filter((item) =>
291
+ item.includes(contains.value.toLowerCase())
292
+ );
293
+ }
294
+
295
+ requestAnimationFrame(() => {
296
+ newdata.map((item, index) => {
297
+ var i = 0;
298
+ let nWords = item.split(" ");
299
+ var wordHtml = "";
300
+
301
+ nWords.map((word) => {
302
+ wordHtml += `<a style="margin:0 5px 0 0; font-size:14px; color:#007bff" title="Lookup ${word} in Dictionary" target="_blank" href="/word-meaning?search=${word}">${word}</a>`;
303
+ });
304
+
305
+ var dataDiv = document.createElement("div");
306
+ dataDiv.className = "col-lg-3 col-md-4 col-sm-6 col-xs-6";
307
+
308
+ dataDiv.insertAdjacentHTML("beforeend", wordHtml);
309
+
310
+ main.insertAdjacentElement("beforeend", dataDiv);
311
+ subResult.innerHTML = "";
312
+ lazyLoader.style.display = "block";
313
+ });
314
+ resultArr = [];
315
+ if (n > 2) {
316
+ wordArr = wordArr.filter(
317
+ (w) => w.length < Math.round(userValue.length / 2)
318
+ );
319
+ // console.time("combination time");
320
+ var data = getComboWords(combinations, wordArr, userValue);
321
+ // console.timeEnd("combination time");
322
+ n--;
323
+ console.log("calling display ui from recursion");
324
+ if (data.length != 0) {
325
+ displayUi(resultArr, data, userValue, n, wordArr);
326
+ } else {
327
+ found.clear();
328
+ // console.log("refreshing");
329
+ m_words = +max_words.value;
330
+ scrabbleWordArr = [];
331
+ lazyLoader.style.display = "none";
332
+ }
333
+ } else {
334
+ found.clear();
335
+ // console.log("refreshing");
336
+ m_words = +max_words.value;
337
+ scrabbleWordArr = [];
338
+ lazyLoader.style.display = "none";
339
+ }
340
+ });
341
+ }
342
+ }
104
343
 
105
- form.addEventListener("submit", getData);
344
+ // function showLoader() {
345
+ // lazyLoader.style.display = "block";
346
+ // loadMore.style.display = "none";
347
+ // }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/assets/js/xyz.js CHANGED
File without changes
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: 1.7.0
4
+ version: 1.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - manpreet-appscms
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-07 00:00:00.000000000 Z
11
+ date: 2023-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -223,7 +223,6 @@ files:
223
223
  - assets/images/Arjyahi.webp
224
224
  - assets/images/EMDI - Hurts Like This (feat. Veronica Bravo) [NCS Release].mp3
225
225
  - assets/images/Nikita.webp
226
- - assets/images/Resume - Google Docs.pdf
227
226
  - assets/images/abp.svg
228
227
  - assets/images/adblock.svg
229
228
  - assets/images/alka.webp
@@ -255,6 +254,7 @@ files:
255
254
  - assets/images/linkedin.svg
256
255
  - assets/images/linkedin2.svg
257
256
  - assets/images/loading.gif
257
+ - assets/images/manpreet-spinner.gif
258
258
  - assets/images/next.webp
259
259
  - assets/images/paavan.webp
260
260
  - assets/images/pallavi.jpeg
@@ -329,7 +329,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
329
329
  - !ruby/object:Gem::Version
330
330
  version: '0'
331
331
  requirements: []
332
- rubygems_version: 3.1.2
332
+ rubygems_version: 3.3.5
333
333
  signing_key:
334
334
  specification_version: 4
335
335
  summary: Word-Games theme for all word-games-sites
Binary file