From 14625c8a5624d88bf68f1f53901c81aa5005faf1 Mon Sep 17 00:00:00 2001 From: Nathan Arthur Date: Wed, 20 Mar 2024 15:20:52 -0400 Subject: [PATCH] add snap class on snap param --- src/scripts/snap.ts | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/scripts/snap.ts diff --git a/src/scripts/snap.ts b/src/scripts/snap.ts new file mode 100644 index 0000000..2d1e5c3 --- /dev/null +++ b/src/scripts/snap.ts @@ -0,0 +1,8 @@ +// Purpose: Improve reliability of puppeteer diffing + +const urlParams = new URLSearchParams(window.location.search); + +if (urlParams.has("snap")) { + const body = document.querySelector("body"); + body?.classList.add("snap"); +}