Skip to content

Commit

Permalink
Solved news letter popup multiple times loading issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
ygowthamr committed Nov 8, 2024
1 parent fd28070 commit f033d65
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions script/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}

0 comments on commit f033d65

Please sign in to comment.