Skip to content

Commit 1661f16

Browse files
committed
BUG FIXES
1 parent 7d5eaca commit 1661f16

2 files changed

Lines changed: 7 additions & 32 deletions

File tree

app.js

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,36 +1209,7 @@ document.querySelectorAll('.scroll-reveal').forEach(el => {
12091209

12101210
// ─── Mobile Back Button Handling ───
12111211
window.pushModalState = function () {
1212-
// Push a dummy state so back button can be intercepted
1213-
history.pushState({ modalOpen: true }, "");
1212+
// Disabled as per user request for direct back navigation
12141213
};
12151214

1216-
window.addEventListener('popstate', function (e) {
1217-
// Sidebars
1218-
['recents-wrapper', 'tutorial-wrapper', 'cp-wrapper'].forEach(id => {
1219-
if (typeof window.hideSidebarBox === 'function') {
1220-
const el = document.getElementById(id);
1221-
if (el && !el.classList.contains('hidden')) {
1222-
window.hideSidebarBox(id);
1223-
}
1224-
}
1225-
});
1226-
1227-
// Previews
1228-
if (typeof updateEncSidebarPreview === 'function') {
1229-
const encCard = document.getElementById('enc-preview-card');
1230-
if (encCard && !encCard.classList.contains('hidden')) updateEncSidebarPreview(null);
1231-
}
1232-
if (typeof updateDecSidebarPreview === 'function') {
1233-
const decCard = document.getElementById('dec-preview-card');
1234-
if (decCard && !decCard.classList.contains('hidden')) updateDecSidebarPreview(null);
1235-
}
1236-
1237-
// Tutorial Modal
1238-
if (typeof closeTutorialModal === 'function') {
1239-
const tutModal = document.getElementById('tutorial-modal');
1240-
if (tutModal && tutModal.classList.contains('active')) {
1241-
closeTutorialModal();
1242-
}
1243-
}
1244-
});
1215+
// popstate listener removed as per user request for direct back navigation

index/index_script.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,5 +373,9 @@
373373
alert('Link copied to clipboard!');
374374
}
375375
}
376-
377376

377+
// Ensure loader is hidden when navigating back to this page (bfcache support)
378+
window.addEventListener('pageshow', (event) => {
379+
const loader = document.getElementById('page-loader');
380+
if (loader) loader.style.display = 'none';
381+
});

0 commit comments

Comments
 (0)