From 69313fba348d2a3d2b25fcb62305310b26af25e2 Mon Sep 17 00:00:00 2001 From: chamiakJ Date: Thu, 12 Jun 2025 09:38:24 +0530 Subject: [PATCH] Enhance privacy notice functionality in index.html - Updated the privacy notice button to use an ID for easier event handling. - Added an event listener to the button to manage the display of the notice and store user consent in localStorage. --- worklenz-frontend/index.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/worklenz-frontend/index.html b/worklenz-frontend/index.html index 6d44efb5..b95b837b 100644 --- a/worklenz-frontend/index.html +++ b/worklenz-frontend/index.html @@ -64,9 +64,16 @@ notice.innerHTML = `
Analytics Notice
This app uses Google Analytics for anonymous usage stats. No personal data is tracked.
- + `; document.body.appendChild(notice); + // Add event listener to button + const btn = notice.querySelector('#analytics-notice-btn'); + btn.addEventListener('click', function(e) { + e.preventDefault(); + localStorage.setItem('privacyNoticeShown', 'true'); + notice.remove(); + }); } // Wait for DOM to be ready