Permanently dismissable blue banner on first load. Closes #31

This commit is contained in:
Ian Renton
2025-10-07 20:04:32 +01:00
parent a83c787ffe
commit ff8cac274a
5 changed files with 43 additions and 15 deletions

View File

@@ -403,6 +403,16 @@ function setUpEventListeners() {
});
}
// Display the intro box, unless the user has already dismissed it once.
function displayIntroBox() {
if (localStorage.getItem("intro-box-dismissed") == null) {
$("#intro-box").show();
}
$("#intro-box-dismiss").click(function() {
localStorage.setItem("intro-box-dismissed", true);
});
}
// Startup
$(document).ready(function() {
// Call loadOptions(), this will then trigger loading spots and setting up timers.
@@ -411,4 +421,6 @@ $(document).ready(function() {
setInterval(updateRefreshDisplay, 1000);
// Set up event listeners
setUpEventListeners();
// Display intro box
displayIntroBox();
});