···
if (location.search.includes("hrt=true")) localStorage.setItem("hrt", "true");
else if (location.search.includes("hrt=false")) localStorage.setItem("hrt", "false");
39
+
if (location.search.includes("sailor=true")) localStorage.setItem("sailor", "true");
40
+
else if (location.search.includes("sailor=false")) localStorage.setItem("sailor", "false");
createEffect(async () => {
if (props.params.repo && !props.params.repo.startsWith("did:")) {
···
window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", themeEvent);
59
+
if (localStorage.getItem("sailor") === "true") {
60
+
const style = document.createElement("style");
61
+
style.textContent = `
63
+
cursor: url(/cursor.cur), pointer;
68
+
pointer-events: none;
71
+
animation: sparkle 0.8s ease-out forwards;
74
+
@keyframes sparkle {
77
+
transform: translate(0, 0) rotate(0deg) scale(1);
81
+
transform: translate(var(--tx), var(--ty)) rotate(180deg) scale(0);
85
+
document.head.appendChild(style);
88
+
const throttleDelay = 30;
90
+
document.addEventListener("mousemove", (e) => {
91
+
const now = Date.now();
92
+
if (now - lastTime < throttleDelay) return;
95
+
const star = document.createElement("div");
96
+
star.className = "star";
97
+
star.textContent = "✨";
98
+
star.style.left = e.pageX + "px";
99
+
star.style.top = e.pageY + "px";
101
+
const tx = (Math.random() - 0.5) * 50;
102
+
const ty = (Math.random() - 0.5) * 50;
103
+
star.style.setProperty("--tx", tx + "px");
104
+
star.style.setProperty("--ty", ty + "px");
106
+
document.body.appendChild(star);
108
+
setTimeout(() => star.remove(), 800);