Fix iframe recursion and remove all localStorage/cookies site-wide
- 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 <noreply@anthropic.com>
This commit is contained in:
@@ -420,10 +420,7 @@
|
||||
|
||||
// Lightbox: show on first load
|
||||
const lightbox = document.getElementById('lightbox');
|
||||
if (!localStorage.getItem('watchlist-analogfrontier-seen')) {
|
||||
lightbox.style.display = 'flex';
|
||||
localStorage.setItem('watchlist-analogfrontier-seen', '1');
|
||||
}
|
||||
lightbox.style.display = 'flex';
|
||||
|
||||
function closeLightbox() { lightbox.style.display = 'none'; }
|
||||
|
||||
|
||||
@@ -84,12 +84,8 @@ def build_lightbox_html(text: str, slug: str) -> tuple[str, str]:
|
||||
</div>"""
|
||||
|
||||
js = f"""
|
||||
// Lightbox: show on first load
|
||||
const lightbox = document.getElementById('lightbox');
|
||||
if (!localStorage.getItem('watchlist-{slug}-seen')) {{
|
||||
lightbox.style.display = 'flex';
|
||||
localStorage.setItem('watchlist-{slug}-seen', '1');
|
||||
}}
|
||||
lightbox.style.display = 'flex';
|
||||
|
||||
function closeLightbox() {{ lightbox.style.display = 'none'; }}
|
||||
|
||||
|
||||
@@ -438,10 +438,7 @@
|
||||
|
||||
// Lightbox: show on first load
|
||||
const lightbox = document.getElementById('lightbox');
|
||||
if (!localStorage.getItem('watchlist-contentaddictionarchive-seen')) {
|
||||
lightbox.style.display = 'flex';
|
||||
localStorage.setItem('watchlist-contentaddictionarchive-seen', '1');
|
||||
}
|
||||
lightbox.style.display = 'flex';
|
||||
|
||||
function closeLightbox() { lightbox.style.display = 'none'; }
|
||||
|
||||
|
||||
@@ -420,10 +420,7 @@
|
||||
|
||||
// Lightbox: show on first load
|
||||
const lightbox = document.getElementById('lightbox');
|
||||
if (!localStorage.getItem('watchlist-culturaldecay-seen')) {
|
||||
lightbox.style.display = 'flex';
|
||||
localStorage.setItem('watchlist-culturaldecay-seen', '1');
|
||||
}
|
||||
lightbox.style.display = 'flex';
|
||||
|
||||
function closeLightbox() { lightbox.style.display = 'none'; }
|
||||
|
||||
|
||||
@@ -402,10 +402,7 @@
|
||||
|
||||
// Lightbox: show on first load
|
||||
const lightbox = document.getElementById('lightbox');
|
||||
if (!localStorage.getItem('watchlist-lastcinema-seen')) {
|
||||
lightbox.style.display = 'flex';
|
||||
localStorage.setItem('watchlist-lastcinema-seen', '1');
|
||||
}
|
||||
lightbox.style.display = 'flex';
|
||||
|
||||
function closeLightbox() { lightbox.style.display = 'none'; }
|
||||
|
||||
|
||||
@@ -438,10 +438,7 @@
|
||||
|
||||
// Lightbox: show on first load
|
||||
const lightbox = document.getElementById('lightbox');
|
||||
if (!localStorage.getItem('watchlist-soundscapeanomalies-seen')) {
|
||||
lightbox.style.display = 'flex';
|
||||
localStorage.setItem('watchlist-soundscapeanomalies-seen', '1');
|
||||
}
|
||||
lightbox.style.display = 'flex';
|
||||
|
||||
function closeLightbox() { lightbox.style.display = 'none'; }
|
||||
|
||||
|
||||
@@ -447,10 +447,7 @@
|
||||
|
||||
// Lightbox: show on first load
|
||||
const lightbox = document.getElementById('lightbox');
|
||||
if (!localStorage.getItem('watchlist-caa-seen')) {
|
||||
lightbox.style.display = 'flex';
|
||||
localStorage.setItem('watchlist-caa-seen', '1');
|
||||
}
|
||||
lightbox.style.display = 'flex';
|
||||
|
||||
function closeLightbox() {
|
||||
lightbox.style.display = 'none';
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
<body>
|
||||
|
||||
<header>
|
||||
<a href="../index.html" class="back-link">← SPACE</a>
|
||||
<a href="../index.html" class="back-link" target="_top">← SPACE</a>
|
||||
<h1>WATCHLISTS</h1>
|
||||
<!-- SUBTITLE-START --><div class="subtitle">5 COLLECTIONS · CURATED VIDEO ARCHIVES · 36 PLAYLISTS</div><!-- SUBTITLE-END -->
|
||||
</header>
|
||||
|
||||
Reference in New Issue
Block a user