From 17f25edfba5f9f489d84fd3918904772a1d30f7d Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Fri, 19 Dec 2025 05:38:20 +0000 Subject: [PATCH] 12/19/25 V.4 --- assets/js/main.js | 6 +++++- index.php | 30 +++++++++++++++++------------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/assets/js/main.js b/assets/js/main.js index bb04de6..61c2754 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -1,3 +1,5 @@ +const pages = ['home','problem','why','features','how','roi','pricing','who','trust','roadmap','faq','signin','apply']; + document.addEventListener('DOMContentLoaded', () => { // Set initial page based on URL hash or default to 'home' const initialPage = window.location.hash.substring(1) || 'home'; @@ -17,7 +19,9 @@ document.addEventListener('DOMContentLoaded', () => { }); function openPage(pageId, isHistoryNavigation = false) { - if (!pageId) pageId = 'home'; + if (!pages.includes(pageId)) { + pageId = 'home'; + } // Hide all pages document.querySelectorAll('.page').forEach(page => { diff --git a/index.php b/index.php index 2d9ef1d..0ae9488 100644 --- a/index.php +++ b/index.php @@ -99,12 +99,14 @@ -