Hex Bomb-- Adding basic functionality to many main pages.

This commit is contained in:
2022-02-04 23:05:22 +00:00
parent 63148cd9d3
commit f90cc475b6
16 changed files with 441 additions and 1 deletions

14
js/adultcheck.js Normal file
View File

@ -0,0 +1,14 @@
///makes IsAdult equal to whatever is on the local storage
let IsAdult = localStorage.getItem("adult")
///sends you to the redirect page if it's not 1
if (IsAdult != "1") {
window.location.replace("Redirect URL");
}
/// on each page put: <script src="adultcheck.js"></script>
/// on redirect page: <Button onclick="localStorage.setItem("adult", "1")">Yes</button> (also a hyperlink back to the main page.)