word-games-theme 2.8.3 → 2.8.5

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: a6367a031ec15597ddaa8085ad720bce6860d7a9ea82650404a08d72c491e6ae
4
- data.tar.gz: 2735da574dbc2e932009f362a65ddc827619307db80a0aa0470214fbf2abdae1
3
+ metadata.gz: 4e03f2d80709803c04ff82e730ce42b61203ad9a44458ddfcd67cd9fb4a0120d
4
+ data.tar.gz: 548ead9139c433d27aff3b391eb1e8d2ec2154b6d1e97edb07ae7cf4324285ae
5
5
  SHA512:
6
- metadata.gz: 3bc991a069dacebbca46afcd0ccf7d66b0be7db58fd2a359fa0479816f902bf70fa729b1e2da09a4835bdcbae8ea0abd70a4b22ba41baff4367659f43890119f
7
- data.tar.gz: 16b9857eb15cc4827041514b6e3e39be00bef5dcd3e341958eefe06209bcc6d517412b2daa97397fb4e38114a1f0a1e70b5b87afa59434b52a57de28cda9c02d
6
+ metadata.gz: f6904d8895ba760959e09f313ccc131357fd9320c58c7a9d80420560a6b7eac86405537c22c9b16d61034f692ecb1509c9491cf79a7561a18d9f0d03b4aa9f7a
7
+ data.tar.gz: f91fd6044de34017b6ea8ebae7e9720b6bbac57663b583afcfc4cc8e63121f980737e7adf642816361d0f659bc5dfa7996e65cd2111eb55d925c116231c1ce3c
@@ -13,7 +13,7 @@
13
13
  font-size: 15px;
14
14
  border: none;
15
15
  position: relative;
16
- z-index: 9999;
16
+ z-index: 9;
17
17
  }
18
18
  .points{
19
19
  position:relative; top:4px; font-size:12px
@@ -90,14 +90,20 @@ const getDiff = (text1, text2) => {
90
90
  let authorsLists = document.querySelector(".authors-list")
91
91
  let serachBtn = document.querySelector(".serachBtn")
92
92
  let searchBtnContainer = document.querySelector(".search-btn-container")
93
-
94
- let home_page_search_result = document.querySelector("#home_page_search_result")
95
- let homePageSearchResult = `/?search=${serachValue}&dictionary=Dictionary&prefix=&contains=&suffix=&exculde=&inculde=&length=`;
93
+ let home_page_search_result
94
+ let homePageSearchResult
96
95
 
97
96
  // getWords define...
98
97
  const worker = new Worker('/assets/js/wordfinder-worker.js');
99
98
  const getData = async (serachValue) => {
100
99
  try {
100
+
101
+ if (letterLen) {
102
+ home_page_search_result = document.querySelector("#home_page_search_result")
103
+ homePageSearchResult = `/?search=${serachValue}&dictionary=Dictionary&prefix=&contains=&suffix=&exculde=&inculde=&length=`;
104
+ }
105
+
106
+
101
107
  document.querySelector(".main-header").style.background = "#fff"
102
108
  document.querySelector(".heading-h2").style.display = "none"
103
109
  document.querySelector(".sortingFilters").style.display = "none"
@@ -322,12 +328,12 @@ function getWords(data) {
322
328
  }
323
329
 
324
330
 
325
- if(letterLen){
331
+ if (letterLen) {
326
332
  home_page_search_result.href = homePageSearchResult
327
333
  home_page_search_result.innerHTML = `See words of any length with letters ${serachValue.split("")}`
328
334
  }
329
-
330
-
335
+
336
+
331
337
  main.innerHTML += `
332
338
  <div class="allGroupWords wordlistContainer" id="alpha_${i}">
333
339
  <h3 class="wordListHeading lead">${i} Letter Words</h3>
@@ -0,0 +1,126 @@
1
+ self.onmessage = async (event) => {
2
+ if (event.data.type === "api") {
3
+ const { method, endpoint, greenLetters, greenWithIndex } = event.data
4
+ let response = await fetch(`${endpoint}`, {
5
+ method: `${method}`,
6
+ body: JSON.stringify({
7
+ greenLetters: greenLetters,
8
+ greenWithIndex: greenWithIndex,
9
+ }),
10
+ })
11
+ let data = await response.json();
12
+ data = data.slice(0, 1500)
13
+ let ok = true
14
+ let newWordsLength = 0
15
+ for (let i = 0; i <= 15; i++) {
16
+ let newdata = data.filter((item) => item.length === i)
17
+ newWordsLength += newdata.length
18
+ let result = newdata.map((item) => {
19
+ if (item.length === 1) {
20
+ ok = false
21
+ newWordsLength = newWordsLength - 1
22
+ } else {
23
+ let ScrabbleLetterScore = ScrabbleScore()
24
+ sum = 0
25
+ item = item.toLowerCase()
26
+ for (let i = 0; i < item.length; i++) {
27
+ sum += ScrabbleLetterScore[item[i]] || 0 // for unknown characters
28
+ }
29
+ return `
30
+ <a
31
+ style='color: #000 !important;
32
+ font-size: 15px;
33
+ text-decoration: none !important;
34
+ font-weight: 600;
35
+ list-style: none;
36
+ padding: 8px;
37
+ background: #f8f9fa;
38
+ border-radius: 5px;
39
+ margin: 6px 6px;
40
+ width: auto;
41
+ text-align: center;
42
+ border: solid 1px var(--black-color);
43
+ box-shadow: 2px 2px 1px 0px var(--black-color);'
44
+ class="anchor__style" title="Lookup ${item} in Dictionary" target="_blank" href="/word-meaning?search=${item.toLowerCase()}">
45
+ ${item}
46
+ <span class="points" value="${sum}" style="position:relative; top:4px; font-size:12px">${sum}</span>
47
+ </a>
48
+ `;
49
+ }
50
+ })
51
+
52
+ self.postMessage({
53
+ data: newdata,
54
+ i: i,
55
+ newWordsLength: newWordsLength,
56
+ result,
57
+ ok: ok
58
+ });
59
+ }
60
+ }
61
+
62
+ };
63
+ const ScrabbleScore = (dictonary) => {
64
+ let twl06_sowpods = {
65
+ a: 1,
66
+ e: 1,
67
+ i: 1,
68
+ o: 1,
69
+ u: 1,
70
+ l: 1,
71
+ n: 1,
72
+ r: 1,
73
+ s: 1,
74
+ t: 1,
75
+ d: 2,
76
+ g: 2,
77
+ b: 3,
78
+ c: 3,
79
+ m: 3,
80
+ p: 3,
81
+ f: 4,
82
+ h: 4,
83
+ v: 4,
84
+ w: 4,
85
+ y: 4,
86
+ k: 5,
87
+ j: 8,
88
+ x: 8,
89
+ q: 10,
90
+ z: 10,
91
+ };
92
+ let wwfScore = {
93
+ a: 1,
94
+ b: 4,
95
+ c: 4,
96
+ d: 2,
97
+ e: 1,
98
+ f: 4,
99
+ g: 3,
100
+ h: 3,
101
+ i: 1,
102
+ j: 10,
103
+ k: 5,
104
+ l: 2,
105
+ m: 4,
106
+ n: 2,
107
+ o: 1,
108
+ p: 4,
109
+ q: 10,
110
+ r: 1,
111
+ s: 1,
112
+ t: 1,
113
+ u: 2,
114
+ v: 5,
115
+ w: 4,
116
+ x: 8,
117
+ y: 3,
118
+ z: 10,
119
+ };
120
+
121
+ if (dictonary === "wwf") {
122
+ return wwfScore;
123
+ } else {
124
+ return twl06_sowpods;
125
+ }
126
+ };
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: word-games-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.3
4
+ version: 2.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - manpreet-appscms
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-17 00:00:00.000000000 Z
11
+ date: 2024-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -401,6 +401,7 @@ files:
401
401
  - assets/js/wordgames-xyz.js
402
402
  - assets/js/wordleSolver.js
403
403
  - assets/js/wordleSolverResult.js
404
+ - assets/js/words-in-certain-positions-worker.js
404
405
  - assets/js/words-in-certain-positions.js
405
406
  - assets/js/words-starting-with.js
406
407
  - assets/js/xletter-home.js