linkInBioTemplatemain.tsx6 matches
5// ... (previous AuthContext, AuthProvider, and useAuth remain the same)
67function App() {
8// ... (App component remains the same)
9}
1011function Home({ theme }) {
12const { user } = useAuth();
13const isDark = theme === 'dark';
51}
5253function PromptGenerator() {
54const [prompt, setPrompt] = useState('');
5580}
8182function Tools({ theme }) {
83const isDark = theme === 'dark';
84const tools = [
102}
103104function Gallery({ theme }) {
105const isDark = theme === 'dark';
106const [filter, setFilter] = useState('all');
209};
210211// ... (client and server functions remain the same)
finalScrapermain.tsx3 matches
7import { createRoot } from "https://esm.sh/react-dom/client";
89function App() {
10const [link, setLink] = useState("");
11const [results, setResults] = useState(null);
81}
8283function client() {
84createRoot(document.getElementById("root")).render(<App />);
85}
89}
9091async function server(request: Request): Promise<Response> {
92if (request.method === "POST" && new URL(request.url).pathname === "/scrape") {
93const { link } = await request.json();
hasWebsiteChangedmain.tsx1 match
7import slugify from "npm:slugify";
89export async function hasWebsiteChanged(url: string, threshold = 0.5) {
10const slug = slugify(url);
11
3import Jimp from "npm:jimp";
45export async function blobReadPictureExample(request: Request): Promise<Response> {
6const searchParams = new URL(request.url).searchParams;
7const url = searchParams.get("url") || "https://www.browserbase.com";
browserbaseUtilsmain.tsx2 matches
5}
67export async function loadPageContent(url: string, options: LoadPageContentOptions = { textContent: false }) {
8const browser = await puppeteer.connect({
9browserWSEndpoint: `wss://connect.browserbase.com?apiKey=${Deno.env.get("BROWSERBASE_API_KEY")}`,
33}
3435export async function screenshotPage(url: string, options: ScreenshotPageOptions = { fullPage: true }) {
36const browser = await puppeteer.connect({
37browserWSEndpoint: `wss://connect.browserbase.com?apiKey=${Deno.env.get("BROWSERBASE_API_KEY")}`,
2import { email } from "https://esm.town/v/std/email?v=12";
34export default async function(interval: Interval) {
5const bbLandingChanged = await hasWebsiteChanged("https://www.browserbase.com");
6console.log("bbLandingChanged", bbLandingChanged);
sqliteExplorerAppREADME.md1 match
33- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
34- [x] make result tables scrollable
35- [x] add export to CSV, and JSON (CSV and JSON helper functions written in [this val](https://www.val.town/v/nbbaier/sqliteExportHelpers). Thanks to @pomdtr for merging the initial version!)
36- [x] add listener for cmd+enter to submit query
stiffCoffeeLampreyREADME.md1 match
11import { email } from "https://esm.town/v/std/email?v=13";
1213export default async function (interval: Interval) {
14const bookingInfo = await resyBot( {
15slug: 'amaro-bar',
11import { email } from "https://esm.town/v/std/email?v=13";
1213export default async function (interval: Interval) {
14const bookingInfo = await resyBot( {
15slug: 'amaro-bar',
frozenSapphireIguanamain.tsx9 matches
8import { createRoot } from "https://esm.sh/react-dom/client";
910function App() {
11const [origin, setOrigin] = useState("");
12const [results, setResults] = useState([]);
237}
238239function client() {
240createRoot(document.getElementById("root")).render(<App />);
241}
245}
246247export default async function server(request: Request): Promise<Response> {
248console.log("Received request:", request.url);
249const url = new URL(request.url);
373});
374} catch (error) {
375console.error("Error in server function:", error);
376return new Response(JSON.stringify({ error: "An error occurred while calculating travel times", details: error.message }), {
377headers: { "Content-Type": "application/json" },
397}
398399async function findNearest(origin: string, locations: any[], apiKey: string): Promise<any> {
400console.log(`Finding nearest location among ${locations.length} options`);
401const batchSize = 25; // Google Maps API typically allows up to 25 destinations per request
439}
440441async function getDrivingTime(origin: string, destination: string, apiKey: string, arrivalTime?: string, arrivalDay?: string): Promise<string> {
442let directionsUrl = `https://maps.googleapis.com/maps/api/directions/json?origin=${encodeURIComponent(origin)}&destination=${encodeURIComponent(destination)}&mode=driving&key=${apiKey}`;
443
460}
461462async function getTransitTime(origin: string, destination: string, apiKey: string): Promise<string> {
463const directionsUrl = `https://maps.googleapis.com/maps/api/directions/json?origin=${encodeURIComponent(origin)}&destination=${encodeURIComponent(destination)}&mode=transit&key=${apiKey}`;
464475}
476477async function getZipCode(address: string, apiKey: string): Promise<string> {
478const geocodeUrl = `https://maps.googleapis.com/maps/api/geocode/json?address=${encodeURIComponent(address)}&key=${apiKey}`;
479const response = await fetch(geocodeUrl);
490}
491492function getNextDayOfWeek(date: Date, dayOfWeek: string): Date {
493const days = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'];
494const targetDay = days.indexOf(dayOfWeek.toLowerCase());