Skip to content

Commit

Permalink
fix: #562 alteração do consentimento pro localStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
andregiachini committed Jan 18, 2024
1 parent f0f1735 commit 98398ad
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions resources/views/layouts/footer.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,18 +189,18 @@ class="ml-2"><i class="bi bi-linkedin bx bxl-linkedin"

<script>
const btn_accept = document.getElementById('close-btn');
btn_accept.addEventListener("click", myFunction);
const btn_accept = document.getElementById('close-btn');
btn_accept.addEventListener("click", myFunction);
const consent = sessionStorage.getItem('consent');
const consent = localStorage.getItem('consent');
if(!consent){
document.getElementById("popup-container").style.visibility = "visible";
}
function myFunction(){
document.getElementById("popup-container").style.visibility = "hidden";
sessionStorage.setItem('consent','true');
}
if(!consent){
document.getElementById("popup-container").style.visibility = "visible";
}
function myFunction(){
document.getElementById("popup-container").style.visibility = "hidden";
localStorage.setItem('consent','true');
}
</script>

0 comments on commit 98398ad

Please sign in to comment.