11// ==/UserScript==
1213(function() {
14"use strict";
1516let extractedContext = null;
1718function extractSettingTags() {
19console.log(`Extracting setting tags...`);
20const settingTags = document.querySelectorAll("a.tagItem--cat_4");
27}
2829document.addEventListener("DOMContentLoaded", function() {
30extractedContext = extractSettingTags();
31});
168store.subscribe(updateUI);
169170async function* streamProcessor(reader) {
171const decoder = new TextDecoder();
172let buffer = "";
203};
204205async function processApiResponse(response) {
206const reader = response.body.getReader();
207218}
219220async function handleSelection(selectedText, isFollowUp = false) {
221if (!selectedText) {
222console.log("No text selected, exiting handleSelection");
250}
251252function getSelectedText() {
253return window.getSelection().toString().trim();
254}
390};
391392function createCloseButton() {
393const closeBtn = document.createElement("button");
394closeBtn.innerText = "x";
406}
407408async function makeApiRequest(text, originalSelection = null) {
409console.log(`makeApiRequest called with text: "${text}", originalSelection: "${originalSelection}"`);
410try {
DeleteExtraTextmain.tsx3 matches
4// You need to remove all instances of the word New then it'll remove the date and word count so it's easier
5// to compare the actual list of title to what I got
6function App() {
7const [input, setInput] = useState("");
8const [output, setOutput] = useState("");
53}
5455function client() {
56createRoot(document.getElementById("root")).render(<App />);
57}
59if (typeof document !== "undefined") { client(); }
6061export default async function server(request: Request): Promise<Response> {
62return new Response(
63`
dm_callback_exampleREADME.md1 match
1Docs: https://docs.lumalabs.ai/docs/api#how-to-get-a-callback-when-generation-has-an-update
23you can now pass callback_url in the body of api / create function on python/js sdks.
4available on version 1.1.0
5
mlbScoreFetchermain.tsx3 matches
3import { createRoot } from "https://esm.sh/react-dom/client";
45function App() {
6const [scores, setScores] = useState([]);
7const [loading, setLoading] = useState(true);
55}
5657function client() {
58createRoot(document.getElementById("root")).render(<App />);
59}
63}
6465export default async function server(request: Request): Promise<Response> {
66const url = new URL(request.url);
67
oliveGardenCharmain.tsx4 matches
3import { createRoot } from "https://esm.sh/react-dom/client";
45function App() {
6const [coworkers, setCoworkers] = useState([]);
7const [newCoworker, setNewCoworker] = useState("");
107}
108109function SwipeToDelete({ children, onDelete }) {
110const [startX, setStartX] = useState(null);
111const [offset, setOffset] = useState(0);
151}
152153function client() {
154createRoot(document.getElementById("root")).render(<App />);
155}
156if (typeof document !== "undefined") { client(); }
157158export default async function server(request: Request): Promise<Response> {
159const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
160const SCHEMA_VERSION = 2;
healthtech4africamain.tsx3 matches
5const countries = ["Kenya", "India"];
67function App() {
8const [country, setCountry] = useState("");
9const [userId, setUserId] = useState("");
150}
151152function client() {
153createRoot(document.getElementById("root")).render(<App />);
154}
158}
159160export default async function server(request: Request): Promise<Response> {
161const { OpenAI } = await import("https://esm.town/v/std/openai");
162const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
tldrawclientmain.tsx1 match
6import { Tldraw } from "https://esm.sh/tldraw@2.1.0";
78export function App() {
9return (
10<>
hello_worldmain.tsx1 match
1export default async function(req: Request): Promise<Response> {
2return Response.json("hello world!");
3}
vtu_readUsermain.tsx1 match
6import { blob } from "https://esm.town/v/std/blob"
78export default async function readUser (UserId:string):Promise<any> {
9expectEMailAddress('user id',UserId)
10
vtu_deleteUsermain.tsx1 match
5import { blob } from "https://esm.town/v/std/blob"
67export default async function deleteUser (UserId:string):Promise<void> {
8expectEMailAddress('user id',UserId)
9