···
if (location.search.includes("hrt=true")) localStorage.setItem("hrt", "true");
else if (location.search.includes("hrt=false")) localStorage.setItem("hrt", "false");
+
if (location.search.includes("sailor=true")) localStorage.setItem("sailor", "true");
+
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);
+
if (localStorage.getItem("sailor") === "true") {
+
const style = document.createElement("style");
+
cursor: url(/cursor.cur), pointer;
+
animation: sparkle 0.8s ease-out forwards;
+
transform: translate(0, 0) rotate(0deg) scale(1);
+
transform: translate(var(--tx), var(--ty)) rotate(180deg) scale(0);
+
document.head.appendChild(style);
+
const throttleDelay = 30;
+
document.addEventListener("mousemove", (e) => {
+
const now = Date.now();
+
if (now - lastTime < throttleDelay) return;
+
const star = document.createElement("div");
+
star.className = "star";
+
star.textContent = "✨";
+
star.style.left = e.pageX + "px";
+
star.style.top = e.pageY + "px";
+
const tx = (Math.random() - 0.5) * 50;
+
const ty = (Math.random() - 0.5) * 50;
+
star.style.setProperty("--tx", tx + "px");
+
star.style.setProperty("--ty", ty + "px");
+
document.body.appendChild(star);
+
setTimeout(() => star.remove(), 800);