From af5d40c81aeaa6365b41649cf10d60e53b2b3cb2 Mon Sep 17 00:00:00 2001 From: Jeff Repanich Date: Sun, 26 Jul 2026 13:32:43 -0400 Subject: [PATCH 1/2] fix: remove production analytics scripts --- index.html | 14 -------------- scripts/verify-static-output.ts | 8 ++++++++ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/index.html b/index.html index 7391a57..a385f05 100644 --- a/index.html +++ b/index.html @@ -6,20 +6,6 @@ Askr - - - diff --git a/scripts/verify-static-output.ts b/scripts/verify-static-output.ts index 3ebe83d..2f60d55 100644 --- a/scripts/verify-static-output.ts +++ b/scripts/verify-static-output.ts @@ -118,6 +118,14 @@ for (const expectation of expectations) { !html.includes('/src/'), `${expectation.route} references source files` ); + assert( + !/]*\bsrc=["']https?:\/\//i.test(html), + `${expectation.route} loads an executable third-party script` + ); + assert( + !html.includes('googletagmanager.com') && !html.includes('dataLayer'), + `${expectation.route} contains removed analytics code` + ); assert( html.includes('/assets/askr-logo-64.avif'), `${expectation.route} is missing the Askr mark` From 40f7c7f86c99cdc0703cb478ab5f16cca6e6d6df Mon Sep 17 00:00:00 2001 From: Jeff Repanich Date: Sun, 26 Jul 2026 13:37:07 -0400 Subject: [PATCH 2/2] test: reject protocol-relative scripts --- scripts/verify-static-output.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/verify-static-output.ts b/scripts/verify-static-output.ts index 2f60d55..73b7828 100644 --- a/scripts/verify-static-output.ts +++ b/scripts/verify-static-output.ts @@ -119,7 +119,7 @@ for (const expectation of expectations) { `${expectation.route} references source files` ); assert( - !/]*\bsrc=["']https?:\/\//i.test(html), + !/]*\bsrc=["'](?:https?:)?\/\//i.test(html), `${expectation.route} loads an executable third-party script` ); assert(