From b53ff9c3451a26e166da40b22368da58ca1491d7 Mon Sep 17 00:00:00 2001 From: ImpulsiveFPS Date: Mon, 2 Feb 2026 13:15:24 +0100 Subject: [PATCH] Fix: Only block clicks on private services that have data-service attribute (modals), allow others to link normally --- script.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/script.js b/script.js index 0cc5d8a..ae2410c 100644 --- a/script.js +++ b/script.js @@ -594,20 +594,22 @@ document.addEventListener('DOMContentLoaded', initServiceStatusChecker); * Service Info Modals */ function initServiceModals() { - const privateServices = document.querySelectorAll('.private-service'); + // Only handle services that have data-service attribute (not links to dummy pages) + const privateServices = document.querySelectorAll('.private-service[data-service]'); const modals = document.querySelectorAll('.service-modal'); const closeButtons = document.querySelectorAll('.modal-close'); - // Open modal when clicking private service + // Open modal when clicking private service that has a modal privateServices.forEach(service => { service.addEventListener('click', (e) => { - e.preventDefault(); const serviceName = service.getAttribute('data-service'); const modal = document.getElementById(`modal-${serviceName}`); if (modal) { + e.preventDefault(); modal.classList.add('active'); document.body.style.overflow = 'hidden'; } + // If no modal exists, let the link work normally }); });