mirror of
https://github.com/ssyyhhrr/stewardle.git
synced 2025-11-13 04:23:46 -05:00
Copy Text
This commit is contained in:
@@ -273,7 +273,7 @@ p a:hover {
|
|||||||
|
|
||||||
.shareScreen {
|
.shareScreen {
|
||||||
max-width: 30em;
|
max-width: 30em;
|
||||||
max-height: 80vh;
|
max-height: 90vh;
|
||||||
min-width: 480px;
|
min-width: 480px;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
background-color: #171717;
|
background-color: #171717;
|
||||||
@@ -430,7 +430,7 @@ p a:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.down {
|
.down {
|
||||||
background-color: #4d81e4;
|
background-color: #b042ff;
|
||||||
border-radius: 0px 0px 36% 36%;
|
border-radius: 0px 0px 36% 36%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -581,6 +581,7 @@ p a:hover {
|
|||||||
.frame {
|
.frame {
|
||||||
height: 35px;
|
height: 35px;
|
||||||
width: 35px;
|
width: 35px;
|
||||||
|
outline: 1px solid #3a3a3c;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flag {
|
.flag {
|
||||||
@@ -605,7 +606,6 @@ p a:hover {
|
|||||||
|
|
||||||
@media(max-height:720px) {
|
@media(max-height:720px) {
|
||||||
.shareScreen {
|
.shareScreen {
|
||||||
max-height: 90vh;
|
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -267,6 +267,27 @@ async function submit(guess, real) {
|
|||||||
count = false
|
count = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
let attempts = (6 - (Array.from(document.getElementsByClassName("frame")).filter(x => x.childNodes.length == 0).length / 7))
|
||||||
|
let gameNumber = Math.floor((Date.now() - 1655769600000) / 86400000)
|
||||||
|
let clipboard = `Stewardle ${gameNumber} ${attempts}/6<br><br>`
|
||||||
|
let x = 0
|
||||||
|
Array.from(document.getElementsByClassName("frame")).filter(x => x.classList.length > 1).forEach((frame, index) => {
|
||||||
|
if (index > 11) {
|
||||||
|
x++
|
||||||
|
if (frame.classList[1] == "down") clipboard += "⬇️"
|
||||||
|
else if (frame.classList[1] == "correct") clipboard += "🟩"
|
||||||
|
else if (frame.classList[1] == "up") clipboard += "⬆️"
|
||||||
|
else if (frame.classList[1] == "incorrect") clipboard += "🟥"
|
||||||
|
else if (frame.classList[1] == "previous") clipboard += "🟧"
|
||||||
|
if (x == 6) {
|
||||||
|
x = 0
|
||||||
|
clipboard += "<br>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
document.getElementById("copyable").innerHTML = clipboard
|
||||||
|
}, 1250)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the date we're counting down to
|
// Set the date we're counting down to
|
||||||
|
|||||||
@@ -80,6 +80,12 @@
|
|||||||
<p><b>6</b></p>
|
<p><b>6</b></p>
|
||||||
<div class="bar" id="six">0</div>
|
<div class="bar" id="six">0</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="score">
|
||||||
|
<p></p>
|
||||||
|
<div class="splitter"></div>
|
||||||
|
<p><b>Score</b></p>
|
||||||
|
<p id="copyable"></p>
|
||||||
|
</div>
|
||||||
<div class="copy">
|
<div class="copy">
|
||||||
<div class="btn"><i class="fa-solid fa-copy"></i> Copy</div>
|
<div class="btn"><i class="fa-solid fa-copy"></i> Copy</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user