veeee 😭
This commit is contained in:
parent
d6b0c5a4d4
commit
64e86947c1
4 changed files with 143 additions and 2 deletions
29
index.html
29
index.html
|
@ -6,7 +6,7 @@
|
|||
<title>How long since a message was blocked in Vencord</title>
|
||||
<style>
|
||||
img {
|
||||
width: 90%;
|
||||
width: 20%;
|
||||
margin-top: 40px;
|
||||
}
|
||||
body {
|
||||
|
@ -36,7 +36,32 @@
|
|||
<h1>It has been</h1>
|
||||
<p id="counter">00:00:01</p>
|
||||
<h3>since a message has been blocked in Vencord.</h3>
|
||||
<p class="reason">(Low Quality Spam)</p>
|
||||
</div>
|
||||
<script>
|
||||
let lastAutomoddedTime = Date.now();
|
||||
function updateTimer() {
|
||||
const now = Date.now();
|
||||
const totalSeconds =
|
||||
Math.floor(now / 1000) -
|
||||
Math.floor(lastAutomoddedTime / 1000);
|
||||
|
||||
const hours = Math.floor(totalSeconds / 3600);
|
||||
const minutes = Math.floor(totalSeconds / 60) - hours * 60;
|
||||
const seconds = totalSeconds - minutes * 60 - hours * 3600;
|
||||
|
||||
document.querySelector("#counter").innerHTML = `${
|
||||
hours !== 0 ? `${hours}:` : ""
|
||||
}${minutes}:${seconds.toString().padStart(2, "0")}`;
|
||||
}
|
||||
|
||||
const ws = new WebSocket("wss://hlsa.nin0.dev/ws");
|
||||
ws.onmessage = (d) => {
|
||||
const data = JSON.parse(d.data);
|
||||
console.log(data);
|
||||
lastAutomoddedTime = data.lastAutomoddedTime;
|
||||
|
||||
setInterval(updateTimer, 500);
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue