Skip to content

Commit

Permalink
WSTATS: preparation for the apocalypse
Browse files Browse the repository at this point in the history
Let it blink, let it blink :D
  • Loading branch information
mascaldotfr committed Jun 8, 2024
1 parent e5f35cf commit cb70b02
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions css/wstats.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ h2 a, h3 a, #ws-index-list a {
h2 a, h3 a {
color: var(--foreground);
}
.blink {
animation: blinking 1.5s infinite;
}
@keyframes blinking {
50% { color: red; background: black; }
}
#ws-container-text .ws-card {
display: flex;
flex-wrap: wrap;
Expand Down
2 changes: 1 addition & 1 deletion js/menu.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions js/wstats.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ async function display_stat() {
`${naify(timestamp_ago(r["gems"]["stolen"]["last"], true).human, "N/A")}`],
["Dragon wish",
`${naify(timestamp_ago(r["wishes"]["last"], true).human, "N/A")}`]];
let now = new Date();
let earliest_date = (now.getTime() / 1000) - (days * 3600 * 24);
if (r["wishes"]["last"] <= earliest_date) // out of bound wish
rows[2][1] = `<span class="blink">☠${rows[2][1]}☠</span>`;
table_factory(rows, `#ws-last-${realm.toLowerCase()}`, realm);
}
}
Expand Down

0 comments on commit cb70b02

Please sign in to comment.