From c1a7098ebe1bb86e6d13c2bee9e9eb25d885b046 Mon Sep 17 00:00:00 2001
From: JL Kruger
Date: Sat, 28 Mar 2026 16:03:17 +0200
Subject: [PATCH] Fix iframe recursion and remove all localStorage/cookies
site-wide
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- Add target="_top" to all ← SPACE / back-to-root links so navigating
back to index.html breaks out of the content iframe instead of loading
it recursively inside itself (Images, Music, Watchlists hubs)
- Remove all localStorage usage: visited-star tracking in index.html
(resets each visit, no persistence without storage), and lightbox
"show once" guards in all section pages (lightboxes now show on every
load — Videos, Watchlists, Music). build.py templates updated so
future generated pages stay clean.
Co-Authored-By: Claude Sonnet 4.6
---
Images/images.html | 2 +-
Music/build.py | 5 +----
Music/music-hub.html | 2 +-
Music/music-template.html | 5 +----
Music/oldmusicandmvs.html | 5 +----
Videos/cringe-pit.html | 5 +----
Videos/nomad-soul.html | 5 +----
Videos/renegade-storyteller.html | 5 +----
Watchlists/analogfrontier.html | 5 +----
Watchlists/build.py | 6 +-----
Watchlists/contentaddictionarchive.html | 5 +----
Watchlists/culturaldecay.html | 5 +----
Watchlists/lastcinema.html | 5 +----
Watchlists/soundscapeanomalies.html | 5 +----
Watchlists/watchlist-template.html | 5 +----
Watchlists/watchlists-hub.html | 2 +-
index.html | 4 +---
17 files changed, 17 insertions(+), 59 deletions(-)
diff --git a/Images/images.html b/Images/images.html
index c622b0b..7aa24a3 100644
--- a/Images/images.html
+++ b/Images/images.html
@@ -203,7 +203,7 @@
diff --git a/Music/build.py b/Music/build.py
index 9242cde..08b584b 100644
--- a/Music/build.py
+++ b/Music/build.py
@@ -99,10 +99,7 @@ def build_lightbox_html(text: str, slug: str) -> tuple[str, str]:
js = f"""
const lightbox = document.getElementById('lightbox');
- if (!localStorage.getItem('music-{slug}-seen')) {{
- lightbox.style.display = 'flex';
- localStorage.setItem('music-{slug}-seen', '1');
- }}
+ lightbox.style.display = 'flex';
const closeLightbox = () => {{ lightbox.style.display = 'none'; }};
lightbox.addEventListener('click', (e) => {{
if (e.target === lightbox) closeLightbox();
diff --git a/Music/music-hub.html b/Music/music-hub.html
index 5a74a06..dd8c6f2 100644
--- a/Music/music-hub.html
+++ b/Music/music-hub.html
@@ -143,7 +143,7 @@
diff --git a/Music/music-template.html b/Music/music-template.html
index fe6db87..aacddb0 100644
--- a/Music/music-template.html
+++ b/Music/music-template.html
@@ -535,10 +535,7 @@
document.addEventListener('DOMContentLoaded', () => {
// --- Lightbox ---
const lightbox = document.getElementById('lightbox');
- if (!localStorage.getItem('music-oldmusicandmvs-seen')) {
- lightbox.style.display = 'flex';
- localStorage.setItem('music-oldmusicandmvs-seen', '1');
- }
+ lightbox.style.display = 'flex';
const closeLightbox = () => { lightbox.style.display = 'none'; };
diff --git a/Music/oldmusicandmvs.html b/Music/oldmusicandmvs.html
index 4caf875..bcca9ff 100644
--- a/Music/oldmusicandmvs.html
+++ b/Music/oldmusicandmvs.html
@@ -555,10 +555,7 @@
document.addEventListener('DOMContentLoaded', () => {
const lightbox = document.getElementById('lightbox');
- if (!localStorage.getItem('music-oldmusicandmvs-seen')) {
- lightbox.style.display = 'flex';
- localStorage.setItem('music-oldmusicandmvs-seen', '1');
- }
+ lightbox.style.display = 'flex';
const closeLightbox = () => { lightbox.style.display = 'none'; };
lightbox.addEventListener('click', (e) => {
if (e.target === lightbox) closeLightbox();
diff --git a/Videos/cringe-pit.html b/Videos/cringe-pit.html
index ab1ce06..56429a0 100644
--- a/Videos/cringe-pit.html
+++ b/Videos/cringe-pit.html
@@ -342,13 +342,10 @@
function closeGate() {
const gate = document.getElementById('welcome-gate');
gate.classList.remove('active');
- localStorage.setItem('cringe_pit_visited', 'true');
}
document.addEventListener('DOMContentLoaded', () => {
- if (!localStorage.getItem('cringe_pit_visited')) {
- document.getElementById('welcome-gate').classList.add('active');
- }
+ document.getElementById('welcome-gate').classList.add('active');
});
diff --git a/Videos/nomad-soul.html b/Videos/nomad-soul.html
index 4c9e629..664b4be 100644
--- a/Videos/nomad-soul.html
+++ b/Videos/nomad-soul.html
@@ -403,13 +403,10 @@
function closeGate() {
const gate = document.getElementById('welcome-gate');
gate.classList.remove('active');
- localStorage.setItem('nomad_visited', 'true');
}
document.addEventListener('DOMContentLoaded', () => {
- if (!localStorage.getItem('nomad_visited')) {
- document.getElementById('welcome-gate').classList.add('active');
- }
+ document.getElementById('welcome-gate').classList.add('active');
});
diff --git a/index.html b/index.html
index 81acab7..e891e1e 100644
--- a/index.html
+++ b/index.html
@@ -762,7 +762,7 @@ body::after {
var writingsLightboxShown = false;
var currentWritingIndex = 0;
var writingElements = [];
- var visited = JSON.parse(localStorage.getItem('sp-visited') || '{}');
+ var visited = {};
var starElements = [];
var srAnnounce = document.getElementById('sr-announce');
var backBtn = document.getElementById('back-btn');
@@ -1154,14 +1154,12 @@ body::after {
// Writings star activates the writings sub-map instead of rising a frame
if (star.id === 'writings') {
visited[star.id] = true;
- localStorage.setItem('sp-visited', JSON.stringify(visited));
starElements[index].classList.add('visited');
selectWritingsSection();
return;
}
visited[star.id] = true;
- localStorage.setItem('sp-visited', JSON.stringify(visited));
starElements[index].classList.add('visited');
starElements.forEach(function (el) { el.classList.remove('current'); });
starElements[index].classList.add('current');