word-games-theme 1.2.9 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/word-game/word-game-play.html +40 -37
- data/assets/css/game.css +1 -1
- data/assets/js/createWordle.js +4 -6
- data/assets/js/game.js +18 -3
- data/assets/js/noRefreshAds.js +4 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b13b8f7fcd05c82997055d59246a15f6b0f16c571ec7b2d6337218893d73393
|
4
|
+
data.tar.gz: e438883394cdb2357258d95766300a0b415e765cf40e20ce1b2dc4f17b51d2e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 124eca04254b09f3118440be6e09d948410972bd799cf2287e77294359f0a51e621e27c24eb3c802a1286876a29ed379852e93fcbba3b6f7cecf40107645e1ab
|
7
|
+
data.tar.gz: 2d49013a9b37bb6851ccfbcf696e44be871ec0a17afbec4f69f780a64090b0f90752888abf26e043ef70a0514c287bb71847c35f7c9826a5803c543f47ef30df
|
@@ -9,8 +9,6 @@
|
|
9
9
|
<a class="word-generator-link" href="/word-game-generator-online">Guess the word in six tries </a>
|
10
10
|
</h1>
|
11
11
|
|
12
|
-
|
13
|
-
|
14
12
|
<div class="wordle-time pt-2" style="cursor: pointer;">
|
15
13
|
<i class="bi bi-stopwatch" style="font-size: 18px;"></i>
|
16
14
|
</div>
|
@@ -29,37 +27,38 @@
|
|
29
27
|
<span id="errorMsg"></span>
|
30
28
|
</div>
|
31
29
|
<div class="game-board">
|
32
|
-
<
|
33
|
-
<
|
34
|
-
<
|
35
|
-
<
|
36
|
-
<
|
37
|
-
<
|
38
|
-
<
|
39
|
-
<
|
40
|
-
<
|
41
|
-
<
|
42
|
-
<
|
43
|
-
<
|
44
|
-
<
|
45
|
-
<
|
46
|
-
<
|
47
|
-
<
|
48
|
-
<
|
49
|
-
<
|
50
|
-
<
|
51
|
-
<
|
52
|
-
<
|
53
|
-
<
|
54
|
-
<
|
55
|
-
<
|
56
|
-
<
|
57
|
-
<
|
58
|
-
<
|
59
|
-
<
|
60
|
-
<
|
61
|
-
<
|
30
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
31
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
32
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
33
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
34
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
35
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
36
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
37
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
38
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
39
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
40
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
41
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
42
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
43
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
44
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
45
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
46
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
47
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
48
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
49
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
50
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
51
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
52
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
53
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
54
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
55
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
56
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
57
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
58
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
59
|
+
<input class="tile" onkeypress="limitKeypress(event,this.value,1)">
|
62
60
|
</div>
|
61
|
+
|
63
62
|
<div data-keyboard class="game-keyboard mt-3">
|
64
63
|
<div class="game-keyboard-row">
|
65
64
|
<button role="button" class="key-btn" data-key="Q">Q</button>
|
@@ -97,12 +96,13 @@
|
|
97
96
|
</div>
|
98
97
|
|
99
98
|
</div>
|
99
|
+
<h2 class="text-center font-weight-bolder mb-0 my-4">
|
100
|
+
<a class="word-generator-link" href="/word-game-generator-online">Make your own wordle</a>
|
101
|
+
</h2>
|
100
102
|
<span class="open-popup" data-toggle="modal" data-target="#exampleModal"></span>
|
101
103
|
</div>
|
102
104
|
</div>
|
103
|
-
|
104
|
-
<a class="word-generator-link" href="/word-game-generator-online"> Make your own wordle </a>
|
105
|
-
</h2>
|
105
|
+
|
106
106
|
|
107
107
|
<div class="modal fade modalWrapper" id="exampleModal">
|
108
108
|
<div class="modal-dialog" style="max-width:400px">
|
@@ -134,7 +134,7 @@
|
|
134
134
|
|
135
135
|
</div>
|
136
136
|
|
137
|
-
<div class="pt-4" style="font-size: 14px;">Share
|
137
|
+
<div class="pt-4" style="font-size: 14px;">Share this wordle with your friends</div>
|
138
138
|
<div class="social-sharing-icons d-flex">
|
139
139
|
<a class="facebook-share-link" target="_blank">
|
140
140
|
<img class="share-icon" src="/assets/images/facebooks.svg" alt="facebook-share">
|
@@ -202,4 +202,7 @@
|
|
202
202
|
</div>
|
203
203
|
</div>
|
204
204
|
</div>
|
205
|
-
</div>
|
205
|
+
</div>
|
206
|
+
|
207
|
+
<script src="https://code.jquery.com/jquery-3.6.0.min.js"
|
208
|
+
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
data/assets/css/game.css
CHANGED
data/assets/js/createWordle.js
CHANGED
@@ -5,7 +5,9 @@ let copy_btn = document.querySelector(".copy-btn")
|
|
5
5
|
|
6
6
|
|
7
7
|
let wordlePlayButton = document.querySelector("#wordle-play-button")
|
8
|
-
|
8
|
+
let facebookSHareLink = document.querySelector(".facebook-share-link")
|
9
|
+
let twitterSHareLink = document.querySelector(".twitter-share-link")
|
10
|
+
let whatsappSHareLink = document.querySelector(".whatsapp-share-link")
|
9
11
|
|
10
12
|
let form = document.querySelector('#create-wordle-form')
|
11
13
|
let openPopup = document.querySelector(".open-popup")
|
@@ -13,10 +15,6 @@ let openPopup = document.querySelector(".open-popup")
|
|
13
15
|
const alertContainer = document.querySelector(".alert-container")
|
14
16
|
let errorMsg = document.querySelector("#errorMsg")
|
15
17
|
|
16
|
-
let facebookSHareLink = document.querySelector(".facebook-share-link")
|
17
|
-
let twitterSHareLink = document.querySelector(".twitter-share-link")
|
18
|
-
let whatsappSHareLink = document.querySelector(".whatsapp-share-link")
|
19
|
-
|
20
18
|
|
21
19
|
customWord.focus()
|
22
20
|
|
@@ -50,7 +48,7 @@ const createWordle = (e) => {
|
|
50
48
|
} else {
|
51
49
|
if (customWord.value.length === 5) {
|
52
50
|
openPopup.click()
|
53
|
-
copy_btn.innerHTML = "Copy"
|
51
|
+
copy_btn.innerHTML = "Copy Link"
|
54
52
|
copy_btn.style.background = "dodgerblue"
|
55
53
|
wordlePlayButton.setAttribute("href", `/word-game-play?q=${btoa(customWord.value.toLocaleLowerCase())}`)
|
56
54
|
wordleGameLink.setAttribute("href", `/word-game-play?q=${btoa(customWord.value.toLocaleLowerCase())}`)
|
data/assets/js/game.js
CHANGED
@@ -31,6 +31,17 @@ let gameResultTime = document.querySelector("#game-result-time")
|
|
31
31
|
let wordleRunningTimer = document.querySelector("#wordle-running-timer")
|
32
32
|
// wordleRunningTimer.innerHTML = "00:00"
|
33
33
|
|
34
|
+
|
35
|
+
|
36
|
+
let tile = document.querySelector('.tile')
|
37
|
+
tile.focus()
|
38
|
+
function limitKeypress(event, value, maxLength) {
|
39
|
+
if (value != undefined && value.toString().length >= maxLength) {
|
40
|
+
event.preventDefault();
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
|
34
45
|
let second = 0
|
35
46
|
let minutes = 0
|
36
47
|
let clear
|
@@ -44,7 +55,7 @@ function startTime() {
|
|
44
55
|
min = checkTime(minutes)
|
45
56
|
sec = checkTime(second)
|
46
57
|
|
47
|
-
console.log(min + ":" + sec)
|
58
|
+
// console.log(min + ":" + sec)
|
48
59
|
|
49
60
|
wordleRunningTimer.innerText = min + ":" + sec
|
50
61
|
gameResultTime.innerHTML = "Your game ended :" + " " + min + ":" + sec
|
@@ -129,19 +140,22 @@ const pressKey = (key) => {
|
|
129
140
|
nextTile.dataset.letter = key.toLowerCase()
|
130
141
|
nextTile.dataset.state = "active"
|
131
142
|
nextTile.classList.add("popAni")
|
132
|
-
nextTile.
|
143
|
+
nextTile.value = key
|
144
|
+
nextTile.focus()
|
133
145
|
nextTile.style.border = "2px solid #a7adc0"
|
134
146
|
}
|
135
147
|
const deleteKey = () => {
|
136
148
|
const activeTiles = getActiveTiles()
|
137
149
|
const lastTile = activeTiles[activeTiles.length - 1]
|
138
150
|
if (lastTile == null) return
|
139
|
-
lastTile.
|
151
|
+
lastTile.value = ""
|
152
|
+
lastTile.focus()
|
140
153
|
delete lastTile.dataset.state
|
141
154
|
delete lastTile.dataset.letter
|
142
155
|
lastTile.style.border = "2px solid #dee1e9"
|
143
156
|
lastTile.classList.remove("popAni")
|
144
157
|
}
|
158
|
+
|
145
159
|
const handleSubmit = () => {
|
146
160
|
const allTiles = [...getActiveTiles()]
|
147
161
|
if (allTiles.length !== wordLength) {
|
@@ -179,6 +193,7 @@ const handleSubmit = () => {
|
|
179
193
|
const evaluateTiles = (allTiles, matchedLettersCount, guessWord) => {
|
180
194
|
let reEvaluate = []
|
181
195
|
allTiles.map((tile, index) => {
|
196
|
+
tile.setAttribute("disabled", true)
|
182
197
|
if (targetWord !== guessWord) {
|
183
198
|
setTimeout(() => {
|
184
199
|
tile.classList.add("flip")
|
data/assets/js/noRefreshAds.js
CHANGED
@@ -369,16 +369,13 @@ function getWords(data) {
|
|
369
369
|
let allGroupWords = document.getElementById(`alpha_${i}`)
|
370
370
|
let getAllGroupWords = [...main.getElementsByClassName('allGroupWords')]
|
371
371
|
|
372
|
-
|
373
372
|
if (main.dataset.value !== "null") {
|
374
373
|
if (allGroupWords) {
|
375
374
|
Array.from(getAllGroupWords).forEach((item) => {
|
376
375
|
if (item.id.slice(6) <= stringLength.length) {
|
377
|
-
if (item.nextSibling !== null && item.nextSibling.classList !== undefined && item.nextSibling.classList.contains("mmtwrappos")) {
|
378
|
-
|
379
|
-
|
380
|
-
}
|
381
|
-
allGroupWords.innerHTML = ""
|
376
|
+
// if (item.nextSibling !== null && item.nextSibling.classList !== undefined && item.nextSibling.classList.contains("mmtwrappos")) {
|
377
|
+
// item.nextSibling.style.display = "block"
|
378
|
+
// }
|
382
379
|
item.style.display = "block"
|
383
380
|
}
|
384
381
|
else {
|
@@ -401,6 +398,7 @@ function getWords(data) {
|
|
401
398
|
`
|
402
399
|
}
|
403
400
|
else {
|
401
|
+
console.log(true)
|
404
402
|
let getAllGroupWords = [...main.getElementsByClassName('allGroupWords')]
|
405
403
|
let allGroupWords = document.createElement("div")
|
406
404
|
allGroupWords.className = "allGroupWords wordlistContainer"
|
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.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- manpreet-appscms
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|