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:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user