From 7df0ec54695c0fb8e6a7c105494c14cb6bf4768e Mon Sep 17 00:00:00 2001 From: Orion Reed Date: Sat, 12 Aug 2023 22:52:01 +0100 Subject: [PATCH] log locations --- 404.html | 1 + index.html | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/404.html b/404.html index 055bf00..7fdbc3b 100644 --- a/404.html +++ b/404.html @@ -25,6 +25,7 @@ var pathSegmentsToKeep = 1; var l = window.location; + console.log('location:', l); l.replace( l.protocol + '//' + l.hostname + (l.port ? ':' + l.port : '') + l.pathname.split('/').slice(0, 1 + pathSegmentsToKeep).join('/') + '/?/' + diff --git a/index.html b/index.html index 30f5db8..6a509a5 100644 --- a/index.html +++ b/index.html @@ -26,8 +26,9 @@ (function(l) { if (l.search[1] === '/' ) { var decoded = l.search.slice(1).split('&').map(function(s) { - return s.replace(/~and~/g, '&') + return s.replace(/~and~/g, '&') }).join('?'); + console.log('decoded', decoded); window.history.replaceState(null, null, l.pathname.slice(0, -1) + decoded + l.hash );