From 9a64210a9f73eb8d73e54e38356ccdfefd3a47dd Mon Sep 17 00:00:00 2001 From: mehbark Date: Sun, 20 Aug 2023 13:33:54 -0400 Subject: [PATCH] add randirect --- html/common.tsx | 3 +++ html/cursor-adventure.tsx | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/html/common.tsx b/html/common.tsx index 69fb3e1..ea79761 100644 --- a/html/common.tsx +++ b/html/common.tsx @@ -163,3 +163,6 @@ export function n_of(n: number, x: T): T[] { } export const static_url = (res: string) => `https://static.pyrope.net/${res}`; + +export const randirect = (...urls: string[]) => + `https://pyrope.net/randirect#${urls.join("::")}`; diff --git a/html/cursor-adventure.tsx b/html/cursor-adventure.tsx index 6cfcb4a..47aa62b 100644 --- a/html/cursor-adventure.tsx +++ b/html/cursor-adventure.tsx @@ -1,4 +1,4 @@ -import { Main, render_and_copy } from "./common.tsx"; +import { Main, randirect, render_and_copy } from "./common.tsx"; // i could also have the circle spin and the cursor stay in place :O // but that would lose the interactive aspect D: @@ -365,7 +365,17 @@ render_and_copy( />