From f033d65b8bacb65b9840f8794bdfc1923651fb9c Mon Sep 17 00:00:00 2001 From: ygowthamr Date: Fri, 8 Nov 2024 21:16:42 +0530 Subject: [PATCH] Solved news letter popup multiple times loading issue. --- script/popup.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/script/popup.js b/script/popup.js index 4dbcb71a..30a7e8c4 100644 --- a/script/popup.js +++ b/script/popup.js @@ -23,5 +23,10 @@ document.querySelector('.no-thanks').addEventListener('click', function(event) { event.preventDefault(); document.getElementById('popup').style.display = 'none'; + localStorage.setItem("noThanksClicked", "true"); }); + + if (localStorage.getItem("noThanksClicked") === "true") { + document.getElementById('popup').style.visibility = 'hidden'; + } \ No newline at end of file