Quantcast
Channel: Active questions tagged header - Stack Overflow
Viewing all articles
Browse latest Browse all 700

Changing the amount of time a closed banner will appear again via this script

$
0
0

Here is the script I have which allows the user to close a floating text banner that appears at the top of the page and it works as intended.

<script>!function(){let e=document.getElementById("top-ad-bar"),t=localStorage.getItem("topAdBarClosedAt"),l=new Date().getTime();(!t||l-t>=9e5)&&(e.style.display="flex")}();</script>

However the banner returns if the page is reloaded after about 30 minutes. Can someone tell me how (!t||l-t>=9e5) translates to any amount of time and how to increase to say 3 hours?


Viewing all articles
Browse latest Browse all 700

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>