Unlisted
Versions
- Open: VersionChanges from v180 to v181+1-1⦚ 3 unchanged lines ⦚firstName: 'thomas',lastName: 'seeley',
allowedOrigins: ['https://iamseeley-htmlenergy.web.val.run', 'https://tseeley.com', "https://wando-ui.tseeley.com", "https://falbulous-minimovie.vercel.app"],ogImage: 'https://res.cloudinary.com/dcwnusepx/image/upload/v1721484366/tseeley/flying_ww6ynv.jpg',};⦚ 481 unchanged lines ⦚⦚ 3 unchanged lines ⦚firstName: 'thomas',lastName: 'seeley',allowedOrigins: ['https://iamseeley-htmlenergy.web.val.run', 'https://tseeley.com', "https://wando-ui.tseeley.com", "https://falbulous-minimovie.vercel.app", "https://iamseeley-dailysilverlion.web.val.run/"],ogImage: 'https://res.cloudinary.com/dcwnusepx/image/upload/v1721484366/tseeley/flying_ww6ynv.jpg',};⦚ 481 unchanged lines ⦚ - Open: VersionChanges from v179 to v180+22-1⦚ 464 unchanged lines ⦚headers: { 'Content-Type': 'text/html' },});
}⦚ 464 unchanged lines ⦚headers: { 'Content-Type': 'text/html' },});}export async function useCounterTownMiddleware(trackingData: any): Promise<Response> {const middlewareUrl = 'https://esm.town/v/iamseeley/counterTownMiddleware';const response = await fetch(middlewareUrl, {method: 'POST',headers: {'Content-Type': 'application/json',},body: JSON.stringify({trackingData,allowedOrigins: counterTownConfig.allowedOrigins,}),});if (!response.ok) {throw new Error(`Error in Counter Town middleware: ${response.statusText}`);}return response;} - Open: VersionChanges from v178 to v179+68-16⦚ 24 unchanged lines ⦚}
const url = new URL(req.url);const path = url.pathname;⦚ 6 unchanged lines ⦚} else if (path === '/trackingScript') {return generateTrackingScript(req);} else {return serveHtml(req);⦚ 188 unchanged lines ⦚}await sendAnalyticsData();const interval = setInterval(sendAnalyticsData, 5000); // This can be adjusted if you want the dashboard to update more often.req.signal.addEventListener('abort', () => {clearInterval(interval);⦚ 13 unchanged lines ⦚});}async function handleAnalytics(req: Request): Promise<Response> {⦚ 11 unchanged lines ⦚}const site = url.searchParams.get("site");const path = url.searchParams.get("path");const referrer = url.searchParams.get("referrer") || '(direct)';const browser = url.searchParams.get("browser") || '';⦚ 24 unchanged lines ⦚}const url = new URL(req.url);const path = url.pathname;⦚ 6 unchanged lines ⦚} else if (path === '/trackingScript') {return generateTrackingScript(req);} else if (path === '/pixel.gif') {return handlePixelTracking(req);} else if (path === '/generateTrackingHtml') {return generateTrackingHtml(req);} else {return serveHtml(req);⦚ 188 unchanged lines ⦚}await sendAnalyticsData();const interval = setInterval(sendAnalyticsData, 5000);req.signal.addEventListener('abort', () => {clearInterval(interval);⦚ 13 unchanged lines ⦚});}async function handleAnalytics(req: Request): Promise<Response> {⦚ 11 unchanged lines ⦚}const site = url.searchParams.get("site") || origin;const path = url.searchParams.get("path") || '/';const referrer = url.searchParams.get("referrer") || '(direct)'; - Open: VersionChanges from v177 to v178+4-4⦚ 61 unchanged lines ⦚<!-- Open Graph Meta Tags --><meta property="og:title" content="${possessiveFirstName} sites" />
<meta property="og:description" content="mySites web analytics dashboard" /><meta property="og:image" content="${counterTownConfig.ogImage}" /><meta property="og:type" content="website" /><!-- Twitter Meta Tags --><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="${possessiveFirstName} sites" /><meta name="twitter:description" content="mySites web analytics dashboard" /><meta name="twitter:image" content="${counterTownConfig.ogImage}" /><title>${possessiveFirstName} sites</title>⦚ 342 unchanged lines ⦚⦚ 61 unchanged lines ⦚<!-- Open Graph Meta Tags --><meta property="og:title" content="${possessiveFirstName} sites" /><meta property="og:description" content="Counter Town" /><meta property="og:image" content="https://res.cloudinary.com/dcwnusepx/image/upload/v1725731236/tseeley/Screen_Shot_2024-09-07_at_13.47.08_dj66og.png" /><meta property="og:type" content="website" /><!-- Twitter Meta Tags --><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="${possessiveFirstName} sites" /><meta name="twitter:description" content="Counter Town" /><meta name="twitter:image" content="https://res.cloudinary.com/dcwnusepx/image/upload/v1725731236/tseeley/Screen_Shot_2024-09-07_at_13.47.08_dj66og.png" /><title>${possessiveFirstName} sites</title>⦚ 342 unchanged lines ⦚ - Open: VersionChanges from v176 to v177+6-0⦚ 53 unchanged lines ⦚<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap" rel="stylesheet" />
<!-- Open Graph Meta Tags --><meta property="og:title" content="${possessiveFirstName} sites" /><meta property="og:description" content="mySites web analytics dashboard" />⦚ 352 unchanged lines ⦚⦚ 53 unchanged lines ⦚<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap" rel="stylesheet" /><!-- Favicons --><link rel="icon" type="image/png" href="https://res.cloudinary.com/dcwnusepx/image/upload/c_scale,w_32/v1725808933/ctfavicon_rcj4hd.png" sizes="32x32"><link rel="icon" type="image/png" href="https://res.cloudinary.com/dcwnusepx/image/upload/c_scale,w_16/v1725808933/ctfavicon_rcj4hd.png" sizes="16x16"><link rel="apple-touch-icon" href="https://res.cloudinary.com/dcwnusepx/image/upload/v1725809713/favicon_4_k3cefu.png" sizes="180x180"><link rel="shortcut icon" href="https://res.cloudinary.com/dcwnusepx/image/upload/c_scale,w_64/v1725808933/ctfavicon_rcj4hd.png"><!-- Open Graph Meta Tags --><meta property="og:title" content="${possessiveFirstName} sites" /><meta property="og:description" content="mySites web analytics dashboard" />⦚ 352 unchanged lines ⦚ - Open: VersionChanges from v175 to v176+4-4⦚ 87 unchanged lines ⦚},animation: {
'fade-1': 'fadeInOut 6s linear 0s infinite','fade-2': 'fadeInOut 6s linear 1s infinite','fade-3': 'fadeInOut 6s linear 2s infinite','fade-4': 'fadeInOut 6s linear 3s infinite',}}⦚ 315 unchanged lines ⦚⦚ 87 unchanged lines ⦚},animation: {'fade-1': 'fadeInOut 5s linear 0s infinite','fade-2': 'fadeInOut 5s linear .5s infinite','fade-3': 'fadeInOut 5s linear 1s infinite','fade-4': 'fadeInOut 5s linear 1.5s infinite',}}⦚ 315 unchanged lines ⦚ - Open: VersionChanges from v174 to v175+3-3⦚ 88 unchanged lines ⦚animation: {'fade-1': 'fadeInOut 6s linear 0s infinite',
'fade-2': 'fadeInOut 6s linear 0.5s infinite','fade-3': 'fadeInOut 6s linear 1s infinite','fade-4': 'fadeInOut 6s linear 1.5s infinite',}}⦚ 315 unchanged lines ⦚⦚ 88 unchanged lines ⦚animation: {'fade-1': 'fadeInOut 6s linear 0s infinite','fade-2': 'fadeInOut 6s linear 1s infinite','fade-3': 'fadeInOut 6s linear 2s infinite','fade-4': 'fadeInOut 6s linear 3s infinite',}}⦚ 315 unchanged lines ⦚ - Open: VersionChanges from v173 to v174+4-4⦚ 87 unchanged lines ⦚},animation: {
'fade-1': 'fadeInOut 4s linear 0s infinite','fade-2': 'fadeInOut 4s linear 0.5s infinite','fade-3': 'fadeInOut 4s linear 1s infinite','fade-4': 'fadeInOut 4s linear 1.5s infinite',}}⦚ 315 unchanged lines ⦚⦚ 87 unchanged lines ⦚},animation: {'fade-1': 'fadeInOut 6s linear 0s infinite','fade-2': 'fadeInOut 6s linear 0.5s infinite','fade-3': 'fadeInOut 6s linear 1s infinite','fade-4': 'fadeInOut 6s linear 1.5s infinite',}}⦚ 315 unchanged lines ⦚ - Open: Version+409-0import { initAnalytics, getAnalytics, trackPageView } from 'https://esm.town/v/iamseeley/counterTownDb';export const counterTownConfig = {firstName: 'thomas',lastName: 'seeley',allowedOrigins: ['https://iamseeley-htmlenergy.web.val.run', 'https://tseeley.com', "https://wando-ui.tseeley.com", "https://falbulous-minimovie.vercel.app"],ogImage: 'https://res.cloudinary.com/dcwnusepx/image/upload/v1721484366/tseeley/flying_ww6ynv.jpg',};const possessiveFirstName = counterTownConfig.firstName.endsWith('s')? `${counterTownConfig.firstName}'`: `${counterTownConfig.firstName}'s`;let isInitialized = false;export default async function handler(req: Request): Promise<Response> {if (!isInitialized) {try {await initAnalytics();console.log('Analytics initialized successfully');isInitialized = true;} catch (error) {console.error('Failed to initialize analytics:', error);}}const url = new URL(req.url);const path = url.pathname;if (path === '/') {return serveHtml(req);} else if (path === '/stream') {return handleStream(req);} else if (path === '/trackPageView') {return handleAnalytics(req);
iamseeley-countertown.web.val.run
Updated: September 10, 2024