mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
Permanently dismissable blue banner on first load. Closes #31
This commit is contained in:
@@ -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();
|
||||
});
|
||||
Reference in New Issue
Block a user