From ee2ffc8797d0015e59fb2682db969766dd6145dd Mon Sep 17 00:00:00 2001 From: Ari Date: Sun, 14 Jun 2026 04:07:39 +0100 Subject: [PATCH] yuri, site has issues but Clove will fix --- 404.html | 36 +++++ coffee/index.html | 90 ++++++++--- css/fonts.css | 38 +++-- css/index.css | 313 +++++++++++++++++++++------------------ css/picker.css | 19 ++- css/theme-switcher.css | 8 +- css/themes/frappe.css | 2 +- css/themes/latte.css | 5 +- css/themes/macchiato.css | 2 +- css/themes/mocha.css | 2 +- discord/index.html | 36 +++++ index.html | 36 +++++ js/cat.js | 145 ++++++++++++------ js/flavors.js | 6 +- js/index.js | 25 +++- 15 files changed, 523 insertions(+), 240 deletions(-) diff --git a/404.html b/404.html index 18d6fbc..d330441 100644 --- a/404.html +++ b/404.html @@ -1,3 +1,39 @@ + + diff --git a/coffee/index.html b/coffee/index.html index 51c3815..fd18422 100644 --- a/coffee/index.html +++ b/coffee/index.html @@ -1,40 +1,92 @@ - - + - + + + - + Coffee - - + - + - + - +
-
🫖
-

418

-

I cannot brew coffee, for I am a teapot.

- ← Back to home +
🫖
+

418

+

I cannot brew coffee, for I am a teapot.

+ ← Back to home
- + - - - - - \ No newline at end of file + + + + diff --git a/css/fonts.css b/css/fonts.css index 649ee3a..b67fa4e 100644 --- a/css/fonts.css +++ b/css/fonts.css @@ -1,31 +1,43 @@ @font-face { - font-family: 'Comic Code'; - src: url('https://fonts.doughmination.co.uk/ComicCode-Regular_2022-05-24-151938_hsmz.woff2') format('woff2'), - url('https://fonts.doughmination.co.uk/ComicCode-Regular_2022-05-24-151938_hsmz.woff') format('woff'); + font-family: "Comic Code"; + src: + url("https://fonts.doughmination.co.uk/ComicCode-Regular_2022-05-24-151938_hsmz.woff2") + format("woff2"), + url("https://fonts.doughmination.co.uk/ComicCode-Regular_2022-05-24-151938_hsmz.woff") + format("woff"); font-weight: 400; font-style: normal; } @font-face { - font-family: 'Comic Code'; - src: url('https://fonts.doughmination.co.uk/ComicCode-Italic_2022-05-24-151939_rdtu.woff2') format('woff2'), - url('https://fonts.doughmination.co.uk/ComicCode-Italic_2022-05-24-151939_rdtu.woff') format('woff'); + font-family: "Comic Code"; + src: + url("https://fonts.doughmination.co.uk/ComicCode-Italic_2022-05-24-151939_rdtu.woff2") + format("woff2"), + url("https://fonts.doughmination.co.uk/ComicCode-Italic_2022-05-24-151939_rdtu.woff") + format("woff"); font-weight: 400; font-style: italic; } @font-face { - font-family: 'Comic Code'; - src: url('https://fonts.doughmination.co.uk/ComicCode-Medium_2022-05-24-151941_ugqm.woff2') format('woff2'), - url('https://fonts.doughmination.co.uk/ComicCode-Medium_2022-05-24-151941_ugqm.woff') format('woff'); + font-family: "Comic Code"; + src: + url("https://fonts.doughmination.co.uk/ComicCode-Medium_2022-05-24-151941_ugqm.woff2") + format("woff2"), + url("https://fonts.doughmination.co.uk/ComicCode-Medium_2022-05-24-151941_ugqm.woff") + format("woff"); font-weight: 500; font-style: normal; } @font-face { - font-family: 'Comic Code'; - src: url('https://fonts.doughmination.co.uk/ComicCode-Bold_2022-05-24-152309_zqkm.woff2') format('woff2'), - url('https://fonts.doughmination.co.uk/ComicCode-Bold_2022-05-24-152309_zqkm.woff') format('woff'); + font-family: "Comic Code"; + src: + url("https://fonts.doughmination.co.uk/ComicCode-Bold_2022-05-24-152309_zqkm.woff2") + format("woff2"), + url("https://fonts.doughmination.co.uk/ComicCode-Bold_2022-05-24-152309_zqkm.woff") + format("woff"); font-weight: 700; font-style: normal; -} \ No newline at end of file +} diff --git a/css/index.css b/css/index.css index cc9f9a0..576c120 100644 --- a/css/index.css +++ b/css/index.css @@ -10,158 +10,169 @@ /* Index.html */ - html, body { - display: flex; - justify-content: center; - align-items: center; - padding: 1.5rem 1rem; - height: 100%; - width: 100%; - overflow: hidden; - font-family: 'Comic Code', sans-serif; - overflow-x: hidden; - max-width: 100vw; - margin: 0; - min-height: 100vh; - background: linear-gradient(135deg, var(--base) 0%, var(--mantle) 60%, var(--crust) 100%); - color: var(--text); + display: flex; + justify-content: center; + align-items: center; + padding: 1.5rem 1rem; + height: 100%; + width: 100%; + overflow: hidden; + font-family: "Comic Code", sans-serif; + overflow-x: hidden; + max-width: 100vw; + margin: 0; + min-height: 100vh; + background: linear-gradient( + 135deg, + var(--base) 0%, + var(--mantle) 60%, + var(--crust) 100% + ); + color: var(--text); } html { - background: linear-gradient(135deg, var(--base) 0%, var(--mantle) 60%, var(--crust) 100%); + background: linear-gradient( + 135deg, + var(--base) 0%, + var(--mantle) 60%, + var(--crust) 100% + ); } .hub { - position: auto; - z-index: 1; - width: 100%; - max-width: 460px; + position: auto; + z-index: 1; + width: 100%; + max-width: 460px; } .pfp { - width: 96px; - height: 96px; - border-radius: 50%; - object-fit: cover; - border: 3px solid var(--mauve); - box-shadow: 0 4px 18px rgba(245, 194, 231, 0.25); - margin-bottom: 0.75rem; + width: 96px; + height: 96px; + border-radius: 50%; + object-fit: cover; + border: 3px solid var(--mauve); + box-shadow: 0 4px 18px rgba(245, 194, 231, 0.25); + margin-bottom: 0.75rem; } .hub-header { - text-align: center; - margin-bottom: 2.25rem; + text-align: center; + margin-bottom: 2.25rem; } .hub-header h1 { - margin: 0; - font-size: 2rem; - font-weight: 700; - transition: color 0.6s ease; + margin: 0; + font-size: 2rem; + font-weight: 700; + transition: color 0.6s ease; } .hey { - color: #ffffff + color: #ffffff; } .name { - color: rgb(var(--accent-rgb)) + color: rgb(var(--accent-rgb)); } .name::before { - content: " "; + content: " "; } .tagline { - margin: 0.35rem 0 0; - color: var(--subtext-0); - font-size: 0.95rem; - letter-spacing: 0.04em; - text-transform: uppercase; + margin: 0.35rem 0 0; + color: var(--subtext-0); + font-size: 0.95rem; + letter-spacing: 0.04em; + text-transform: uppercase; } .pronouns { - margin: 0.35rem 0 0; - color: var(--mauve); - font-size: 0.95rem; - letter-spacing: 0.04em; - text-transform: lowercase; + margin: 0.35rem 0 0; + color: var(--mauve); + font-size: 0.95rem; + letter-spacing: 0.04em; + text-transform: lowercase; } body::before { - content: ""; - position: fixed; - inset: 0; - background: url(/assets/theme/estrogen.svg) center / cover no-repeat; - filter: invert(86%) sepia(8%) saturate(900%) hue-rotate(190deg) brightness(105%); - opacity: 0.05; - pointer-events: none; - z-index: 0; + content: ""; + position: fixed; + inset: 0; + background: url(/assets/theme/estrogen.svg) center / cover no-repeat; + filter: invert(86%) sepia(8%) saturate(900%) hue-rotate(190deg) + brightness(105%); + opacity: 0.05; + pointer-events: none; + z-index: 0; } .badges { - position: fixed; - right: 1rem; - bottom: 1rem; - display: flex; - flex-direction: column; - align-items: flex-end; - gap: 0.4rem; - pointer-events: none; - z-index: 5; + position: fixed; + right: 1rem; + bottom: 1rem; + display: flex; + flex-direction: column; + align-items: flex-end; + gap: 0.4rem; + pointer-events: none; + z-index: 5; } .badge { - display: inline-flex; - align-items: center; - gap: 0.4rem; - padding: 0.3rem 0.6rem; - border-radius: 999px; - background: var(--surface-0); - border: 1px solid rgba(var(--accent-rgb), 0.45); - color: var(--subtext-1); - font-size: 0.75rem; - white-space: nowrap; - transition: border-color 0.6s ease, box-shadow 0.6s ease; + display: inline-flex; + align-items: center; + gap: 0.4rem; + padding: 0.3rem 0.6rem; + border-radius: 999px; + background: var(--surface-0); + border: 1px solid rgba(var(--accent-rgb), 0.45); + color: var(--subtext-1); + font-size: 0.75rem; + white-space: nowrap; + transition: + border-color 0.6s ease, + box-shadow 0.6s ease; } .badge:hover { - border-color: rgb(var(--accent-rgb)); - box-shadow: 0 4px 14px -6px rgba(var(--accent-rgb), 0.5); + border-color: rgb(var(--accent-rgb)); + box-shadow: 0 4px 14px -6px rgba(var(--accent-rgb), 0.5); } .badge-icon { - width: 15px; - height: 15px; - filter: invert(78%) sepia(36%) saturate(640%) hue-rotate(280deg) brightness(105%); + width: 15px; + height: 15px; + filter: invert(78%) sepia(36%) saturate(640%) hue-rotate(280deg) + brightness(105%); } - - @media (max-width: 600px) { - .intro { - margin-top: 10vh; - color: var(--text); - text-align: center; - padding: 5vh - } + .intro { + margin-top: 10vh; + color: var(--text); + text-align: center; + padding: 5vh; + } - .intro-text { - margin-top: 1vh; - padding: 1vh; - } + .intro-text { + margin-top: 1vh; + padding: 1vh; + } } @media (min-width: 768px) { - .desktop-break { - display: block; - } + .desktop-break { + display: block; + } - .intro-text { - margin-top: 1vh; - } + .intro-text { + margin-top: 1vh; + } } .gitgay-link { @@ -179,9 +190,14 @@ body::before { font-family: "Comic Code"; } -.hub-header, .pfp, .hey, .pronouns, .intro-text, .gitgay-link { - margin-top: 10px; - margin-bottom: 10px; +.hub-header, +.pfp, +.hey, +.pronouns, +.intro-text, +.gitgay-link { + margin-top: 10px; + margin-bottom: 10px; } /* ---- 88x31 button wall (always visible on desktop) ---- */ @@ -216,7 +232,9 @@ body::before { image-rendering: pixelated; border: 1px solid var(--surface-1); border-radius: 2px; - transition: transform 0.12s ease, border-color 0.12s ease; + transition: + transform 0.12s ease, + border-color 0.12s ease; } .button-wall a:hover img { @@ -224,86 +242,91 @@ body::before { border-color: rgb(var(--accent-rgb)); } - /* Coffee/index.html */ .teapot { - font-size: 6vh; + font-size: 6vh; } /* start of code from security.girlsnetwork.dev/coffee */ body.message-page { - display: flex; - min-height: 100vh; - align-items: center; - justify-content: center; - padding: 1.5rem; + display: flex; + min-height: 100vh; + align-items: center; + justify-content: center; + padding: 1.5rem; } .message-card { - background: var(--surface0); - padding: 2.5rem; - border-radius: 12px; - max-width: 520px; - width: 100%; - box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); - text-align: center; - line-height: 1.6; - color: var(--text); - border: 1px solid var(--surface1); + background: var(--surface0); + padding: 2.5rem; + border-radius: 12px; + max-width: 520px; + width: 100%; + box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); + text-align: center; + line-height: 1.6; + color: var(--text); + border: 1px solid var(--surface1); } .message-card h1 { - margin-top: 0; - color: var(--pink); - letter-spacing: -0.01em; + margin-top: 0; + color: var(--pink); + letter-spacing: -0.01em; } .message-card p { - color: var(--subtext1); + color: var(--subtext1); } -.message-card .ok { color: var(--green); } -.message-card .err { color: var(--red); } -.message-card .warn { color: var(--yellow); } +.message-card .ok { + color: var(--green); +} +.message-card .err { + color: var(--red); +} +.message-card .warn { + color: var(--yellow); +} .message-card .muted { - color: var(--overlay1); - font-size: 0.9rem; - margin-top: 1.5rem; + color: var(--overlay1); + font-size: 0.9rem; + margin-top: 1.5rem; } .message-card code { - background: var(--mantle); - color: var(--rosewater); - padding: 0.1rem 0.4rem; - border-radius: 6px; - font-size: 0.85em; + background: var(--mantle); + color: var(--rosewater); + padding: 0.1rem 0.4rem; + border-radius: 6px; + font-size: 0.85em; } .message-card a.home-link { - display: inline-block; - margin-top: 1.5rem; - color: var(--pink); - transition: color 0.15s ease; + display: inline-block; + margin-top: 1.5rem; + color: var(--pink); + transition: color 0.15s ease; } .message-card a.home-link:hover { - color: var(--flamingo); - text-decoration: underline; + color: var(--flamingo); + text-decoration: underline; } .message-card .glyph { - font-size: 2.75rem; - line-height: 1; - margin-bottom: 0.5rem; + font-size: 2.75rem; + line-height: 1; + margin-bottom: 0.5rem; } @media (max-width: 540px) { - .message-card { - padding: 1.75rem 1.5rem; - } + .message-card { + padding: 1.75rem 1.5rem; + } } /* end of code from security.girlsnetwork.dev/coffee */ diff --git a/css/picker.css b/css/picker.css index 8c8868c..4f636b1 100644 --- a/css/picker.css +++ b/css/picker.css @@ -98,7 +98,10 @@ flex-direction: column; align-items: center; gap: 6px; - transition: border-color .12s, transform .1s, background .12s; + transition: + border-color 0.12s, + transform 0.1s, + background 0.12s; } .cat-option:hover { @@ -179,8 +182,8 @@ kbd { border: 1px solid #585b70; border-bottom-width: 2px; border-radius: 6px; - padding: .05em .45em; - font-size: .85em; + padding: 0.05em 0.45em; + font-size: 0.85em; } .cat-toast { @@ -198,7 +201,9 @@ kbd { white-space: nowrap; opacity: 0; pointer-events: none; - transition: opacity 0.2s ease, transform 0.2s ease; + transition: + opacity 0.2s ease, + transform 0.2s ease; } .cat-toast.show { @@ -293,7 +298,9 @@ kbd { font-size: 0.74rem; text-align: center; cursor: pointer; - transition: transform 0.15s ease, border-color 0.15s ease; + transition: + transform 0.15s ease, + border-color 0.15s ease; } .cat-option:hover:not(.locked) { @@ -332,4 +339,4 @@ kbd { font-size: 0.68rem; color: var(--subtext-0); text-align: center; -} \ No newline at end of file +} diff --git a/css/theme-switcher.css b/css/theme-switcher.css index a73103e..e09a98e 100644 --- a/css/theme-switcher.css +++ b/css/theme-switcher.css @@ -14,7 +14,7 @@ width: 22px; height: 22px; display: block; - background-image: url('/assets/oneko/classics/classic.png'); + background-image: url("/assets/oneko/classics/classic.png"); background-repeat: no-repeat; background-size: 176px 88px; background-position: -66px -66px; @@ -30,7 +30,9 @@ background: var(--surface-0); border: 1px solid var(--surface-1); cursor: pointer; - transition: border-color 0.15s ease, transform 0.15s ease; + transition: + border-color 0.15s ease, + transform 0.15s ease; } .beta-btn:hover { @@ -42,4 +44,4 @@ width: 22px; height: 22px; display: block; -} \ No newline at end of file +} diff --git a/css/themes/frappe.css b/css/themes/frappe.css index 8b50d3e..8c097e4 100644 --- a/css/themes/frappe.css +++ b/css/themes/frappe.css @@ -35,4 +35,4 @@ html[data-flavor="frappe"] { --base: #303446; --mantle: #292c3c; --crust: #232634; -} \ No newline at end of file +} diff --git a/css/themes/latte.css b/css/themes/latte.css index 5935512..5cf6394 100644 --- a/css/themes/latte.css +++ b/css/themes/latte.css @@ -51,6 +51,7 @@ html[data-flavor="latte"] .badge-icon { } html[data-flavor="latte"] body::before { - filter: invert(14%) sepia(0.2) saturate(300%) hue-rotate(200deg) brightness(1.3); + filter: invert(14%) sepia(0.2) saturate(300%) hue-rotate(200deg) + brightness(1.3); opacity: 0.05; -} \ No newline at end of file +} diff --git a/css/themes/macchiato.css b/css/themes/macchiato.css index b1e3a92..bdbcaa6 100644 --- a/css/themes/macchiato.css +++ b/css/themes/macchiato.css @@ -35,4 +35,4 @@ html[data-flavor="macchiato"] { --base: #24273a; --mantle: #1e2030; --crust: #181926; -} \ No newline at end of file +} diff --git a/css/themes/mocha.css b/css/themes/mocha.css index abe8b0a..aff73ae 100644 --- a/css/themes/mocha.css +++ b/css/themes/mocha.css @@ -35,4 +35,4 @@ html[data-flavor="mocha"] { --base: #1e1e2e; --mantle: #181825; --crust: #11111b; -} \ No newline at end of file +} diff --git a/discord/index.html b/discord/index.html index 8d4ae09..8858595 100644 --- a/discord/index.html +++ b/discord/index.html @@ -1 +1,37 @@ + + \ No newline at end of file diff --git a/index.html b/index.html index 75274aa..32c1c90 100644 --- a/index.html +++ b/index.html @@ -1,3 +1,39 @@ + + diff --git a/js/cat.js b/js/cat.js index 3748902..75284b3 100644 --- a/js/cat.js +++ b/js/cat.js @@ -86,16 +86,18 @@ }; function init() { - let nekoFile = "/assets/oneko/classics/classic.png" - const curScript = document.currentScript + let nekoFile = "/assets/oneko/classics/classic.png"; + const curScript = document.currentScript; if (curScript && curScript.dataset.cat) { - nekoFile = curScript.dataset.cat + nekoFile = curScript.dataset.cat; } if (curScript && curScript.dataset.persistPosition) { if (curScript.dataset.persistPosition === "") { persistPosition = true; } else { - persistPosition = JSON.parse(curScript.dataset.persistPosition.toLowerCase()); + persistPosition = JSON.parse( + curScript.dataset.persistPosition.toLowerCase(), + ); } } @@ -136,17 +138,20 @@ if (persistPosition) { window.addEventListener("beforeunload", function (event) { - window.localStorage.setItem("oneko", JSON.stringify({ - nekoPosX: nekoPosX, - nekoPosY: nekoPosY, - mousePosX: mousePosX, - mousePosY: mousePosY, - frameCount: frameCount, - idleTime: idleTime, - idleAnimation: idleAnimation, - idleAnimationFrame: idleAnimationFrame, - bgPos: nekoEl.style.backgroundPosition - })); + window.localStorage.setItem( + "oneko", + JSON.stringify({ + nekoPosX: nekoPosX, + nekoPosY: nekoPosY, + mousePosX: mousePosX, + mousePosY: mousePosY, + frameCount: frameCount, + idleTime: idleTime, + idleAnimation: idleAnimation, + idleAnimationFrame: idleAnimationFrame, + bgPos: nekoEl.style.backgroundPosition, + }), + ); }); } @@ -204,7 +209,7 @@ } idleAnimation = avalibleIdleAnimations[ - Math.floor(Math.random() * avalibleIdleAnimations.length) + Math.floor(Math.random() * avalibleIdleAnimations.length) ]; } @@ -283,7 +288,17 @@ const BASE_SPRITE = "/assets/oneko/classics/classic.png"; let CAT_MODES = []; // Order the category sections appear in the menu -const CATEGORY_ORDER = ["Classics", "Pride", "Cats", "Romance", "Gaming", "Pokémon", "Other Animals", "Things", "Rare"]; +const CATEGORY_ORDER = [ + "Classics", + "Pride", + "Cats", + "Romance", + "Gaming", + "Pokémon", + "Other Animals", + "Things", + "Rare", +]; // click-count goals (total clicks on the cat) const CLICK_GOALS = { filter: 13, romance: 69, weed: 420 }; @@ -303,8 +318,8 @@ const spriteFor = (c) => c.sprite || BASE_SPRITE; index.map((name) => fetch(`/js/on/${name}.json`) .then((r) => (r.ok ? r.json() : [])) - .catch(() => []) - ) + .catch(() => []), + ), ); CAT_MODES = lists.flat(); } catch (err) { @@ -323,9 +338,13 @@ const spriteFor = (c) => c.sprite || BASE_SPRITE; // permanently-earned methods (konami, gold, pokemon, + any click goal hit) let unlocks; - try { unlocks = new Set(JSON.parse(ls.getItem("onekoUnlocks") || "[]")); } - catch (e) { unlocks = new Set(); } - const saveUnlocks = () => ls.setItem("onekoUnlocks", JSON.stringify([...unlocks])); + try { + unlocks = new Set(JSON.parse(ls.getItem("onekoUnlocks") || "[]")); + } catch (e) { + unlocks = new Set(); + } + const saveUnlocks = () => + ls.setItem("onekoUnlocks", JSON.stringify([...unlocks])); // Returns true if a method was newly unlocked (false if already had it) function unlockMethod(key) { @@ -340,11 +359,11 @@ const spriteFor = (c) => c.sprite || BASE_SPRITE; const isUnlocked = (i) => { const key = methodOf(CAT_MODES[i]); if (key === "gay") return true; - if (key in CLICK_GOALS) return clicks >= CLICK_GOALS[key] || unlocks.has(key); - return unlocks.has(key); // konami / gold / pokemon + if (key in CLICK_GOALS) + return clicks >= CLICK_GOALS[key] || unlocks.has(key); + return unlocks.has(key); // konami / gold / pokemon }; - const unlockedIndices = () => - CAT_MODES.map((_, i) => i).filter(isUnlocked); + const unlockedIndices = () => CAT_MODES.map((_, i) => i).filter(isUnlocked); const apply = (i) => { const c = CAT_MODES[i]; @@ -373,9 +392,13 @@ const spriteFor = (c) => c.sprite || BASE_SPRITE; const unlocked = isUnlocked(i); const opt = document.createElement(unlocked ? "button" : "div"); opt.className = - "cat-option" + (unlocked ? "" : " locked") + (i === mode ? " current" : ""); + "cat-option" + + (unlocked ? "" : " locked") + + (i === mode ? " current" : ""); if (unlocked) opt.type = "button"; - const previewFilter = unlocked ? (c.filter || "none") : "brightness(0) opacity(0.3)"; + const previewFilter = unlocked + ? c.filter || "none" + : "brightness(0) opacity(0.3)"; opt.innerHTML = ` ${unlocked ? c.name : "???"}`; @@ -394,8 +417,9 @@ const spriteFor = (c) => c.sprite || BASE_SPRITE; }); // known categories first (in order), then any stragglers - const order = CATEGORY_ORDER.filter((c) => byCat[c]) - .concat(Object.keys(byCat).filter((c) => !CATEGORY_ORDER.includes(c))); + const order = CATEGORY_ORDER.filter((c) => byCat[c]).concat( + Object.keys(byCat).filter((c) => !CATEGORY_ORDER.includes(c)), + ); order.forEach((cat) => { const section = document.createElement("div"); @@ -440,16 +464,26 @@ const spriteFor = (c) => c.sprite || BASE_SPRITE; }); document.addEventListener("keydown", (e) => { // ignore while typing in a field or with modifier keys held - const typing = /^(INPUT|TEXTAREA|SELECT)$/.test(document.activeElement?.tagName || ""); + const typing = /^(INPUT|TEXTAREA|SELECT)$/.test( + document.activeElement?.tagName || "", + ); if (e.key === "Escape" && !overlay.hidden) { closePicker(); } else if ( (e.key === "c" || e.key === "C") && - !e.ctrlKey && !e.metaKey && !e.altKey && !typing + !e.ctrlKey && + !e.metaKey && + !e.altKey && + !typing ) { togglePicker(); - } else if ((e.key === "x" || e.key === "X") && - !e.ctrlKey && !e.metaKey && !e.altKey && !typing) { + } else if ( + (e.key === "x" || e.key === "X") && + !e.ctrlKey && + !e.metaKey && + !e.altKey && + !typing + ) { if (unlockMethod("gaming")) { toast("✨ Gaming sprites unlocked!"); } @@ -477,9 +511,11 @@ const spriteFor = (c) => c.sprite || BASE_SPRITE; boop.preload = "auto"; function playBoop() { try { - boop.currentTime = 0; // rewind so rapid clicks each squeak - boop.play().catch(() => { }); // ignore autoplay/missing-file errors - } catch (e) { /* no-op */ } + boop.currentTime = 0; // rewind so rapid clicks each squeak + boop.play().catch(() => {}); // ignore autoplay/missing-file errors + } catch (e) { + /* no-op */ + } } /* ---------- init + cat click ---------- */ @@ -509,11 +545,24 @@ const spriteFor = (c) => c.sprite || BASE_SPRITE; }); /* ---------- Konami code → press Enter to confirm ---------- */ - const KONAMI = ["ArrowUp", "ArrowUp", "ArrowDown", "ArrowDown", - "ArrowLeft", "ArrowRight", "ArrowLeft", "ArrowRight", "b", "a"]; - let kProg = 0, kArmed = false; + const KONAMI = [ + "ArrowUp", + "ArrowUp", + "ArrowDown", + "ArrowDown", + "ArrowLeft", + "ArrowRight", + "ArrowLeft", + "ArrowRight", + "b", + "a", + ]; + let kProg = 0, + kArmed = false; document.addEventListener("keydown", (e) => { - const typing = /^(INPUT|TEXTAREA|SELECT)$/.test(document.activeElement?.tagName || ""); + const typing = /^(INPUT|TEXTAREA|SELECT)$/.test( + document.activeElement?.tagName || "", + ); if (typing || e.ctrlKey || e.metaKey || e.altKey) return; if (kArmed && e.key === "Enter") { @@ -544,8 +593,10 @@ const spriteFor = (c) => c.sprite || BASE_SPRITE; } }; checkIdle(); - new MutationObserver(checkIdle) - .observe(np, { attributes: true, attributeFilter: ["data-status"] }); + new MutationObserver(checkIdle).observe(np, { + attributes: true, + attributeFilter: ["data-status"], + }); } /* ---------- Pokémon → find & click the hidden pokéball ---------- */ @@ -566,13 +617,17 @@ const spriteFor = (c) => c.sprite || BASE_SPRITE; let elapsed = 0; let last = Date.now(); const timer = setInterval(() => { - if (document.hidden) { last = Date.now(); return; } + if (document.hidden) { + last = Date.now(); + return; + } const now = Date.now(); elapsed += now - last; last = now; if (elapsed >= TIMER_GOAL_MS) { clearInterval(timer); - if (unlockMethod("timer")) toast("✨ Patience pays off — timer cats unlocked!"); + if (unlockMethod("timer")) + toast("✨ Patience pays off — timer cats unlocked!"); } }, 1000); } diff --git a/js/flavors.js b/js/flavors.js index 48a22b2..7757083 100644 --- a/js/flavors.js +++ b/js/flavors.js @@ -13,14 +13,14 @@ function apply(name) { const f = FLAVORS[name] || FLAVORS.mocha; - root.setAttribute("data-flavor", name); // CSS does the rest + root.setAttribute("data-flavor", name); // CSS does the rest const meta = document.querySelector('meta[name="theme-color"]'); if (meta) meta.setAttribute("content", f.dot); } let current = ls.getItem("ctpFlavor"); if (!ORDER.includes(current)) current = "mocha"; - apply(current); // the snippet already set this to avoid a flash + apply(current); // the snippet already set this to avoid a flash // ---- top-right corner icon button ---- const bar = document.createElement("div"); @@ -47,7 +47,7 @@ function paintBtn() { const f = FLAVORS[current]; - icon.src = `/assets/theme/${current}.png`; // e.g. /assets/theme/mocha.png + icon.src = `/assets/theme/${current}.png`; // e.g. /assets/theme/mocha.png icon.alt = f.label; btn.title = `Theme: ${f.label} (click to cycle)`; } diff --git a/js/index.js b/js/index.js index 80480f5..3b21aa9 100644 --- a/js/index.js +++ b/js/index.js @@ -1,2 +1,25 @@ // meow! -console.log("Hey! The fuck are you in the console for?") \ No newline at end of file +console.log("Hey! The fuck are you in the console for?"); + +fetch("/assets/ascii/yuri.ascii") + .then((r) => r.text()) + .then(console.log) + .catch(console.error); + +function loadArt() { + fetch("/arch.ascii") + .then(function (r) { + return r.ok ? r.text() : ""; + }) + .then(function (t) { + if (!t) return; + var lines = t.replace(/\r/g, "").split("\n"); + if (lines[0] && lines[0].trim().charAt(0) === "{") lines.shift(); + lines = lines.map(function (l) { + return l.replace(/\$\{c\d\}/g, ""); + }); + while (lines.length && lines[lines.length - 1].trim() === "") lines.pop(); + archLines = lines; + }) + .catch(function () {}); +}