fixes and major changes
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
const mottos = [
|
||||
"I can explain BGP, but neither of us will enjoy it.",
|
||||
"It was DNS. Everyone take a drink.",
|
||||
"The server is not haunted. I checked twice.",
|
||||
"My favorite alert is the one that fixes itself before I get up.",
|
||||
"I build systems that can be understood and maintained by someone other than me.",
|
||||
"Reliable infrastructure starts with clear ownership and clear documentation.",
|
||||
"Automation should reduce routine work without hiding how the system operates.",
|
||||
"Fix the cause, document the change, and leave the system easier to support.",
|
||||
];
|
||||
|
||||
const glyphs = "01#@$%&*+<>/\\";
|
||||
@@ -84,8 +84,9 @@ function celebrate(): void {
|
||||
}
|
||||
|
||||
function initSecrets(): void {
|
||||
const home = document.querySelector<HTMLButtonElement>("[data-home-play]");
|
||||
home?.addEventListener("click", celebrate);
|
||||
document
|
||||
.querySelector<HTMLButtonElement>("[data-home-play]")
|
||||
?.addEventListener("click", celebrate);
|
||||
|
||||
const sequence = [
|
||||
"ArrowUp",
|
||||
@@ -101,7 +102,10 @@ function initSecrets(): void {
|
||||
];
|
||||
let position = 0;
|
||||
window.addEventListener("keydown", (event) => {
|
||||
position = event.key.toLowerCase() === sequence[position]?.toLowerCase() ? position + 1 : 0;
|
||||
position =
|
||||
event.key.toLowerCase() === sequence[position]?.toLowerCase()
|
||||
? position + 1
|
||||
: 0;
|
||||
if (position === sequence.length) {
|
||||
celebrate();
|
||||
position = 0;
|
||||
|
||||
@@ -14,7 +14,7 @@ const SCALE_ACTIVE = 1.06;
|
||||
type ChipMap = Map<HTMLLIElement, DOMRect>;
|
||||
|
||||
function tokenOf(el: Element): string {
|
||||
return (el.textContent || '').trim();
|
||||
return (el as HTMLElement).dataset.skill || (el.textContent || '').trim();
|
||||
}
|
||||
|
||||
function readReducedMotion(): boolean {
|
||||
|
||||
Reference in New Issue
Block a user