28 lines
891 B
JavaScript
28 lines
891 B
JavaScript
// Gilroy Hacks Website Source Code -> JS (https://gilroyhacks.com)
|
|
|
|
var i;
|
|
var checkboxes = document.querySelectorAll('#signup-container input[type=checkbox]');
|
|
var verify = true;
|
|
function save() {
|
|
for (i = 0; i < checkboxes.length; i++) {
|
|
localStorage.setItem(checkboxes[i].value, checkboxes[i].checked);
|
|
}
|
|
}
|
|
window.onload = function() {
|
|
load();
|
|
};
|
|
function load() {
|
|
for (i = 0; i < checkboxes.length; i++) {
|
|
checkboxes[i].checked = localStorage.getItem(checkboxes[i].value) === 'true' ? true:false;
|
|
}
|
|
}
|
|
function check(id) {
|
|
document.getElementById(id).checked = true;
|
|
}
|
|
function uncheck(id) {
|
|
document.getElementById(id).checked = false;
|
|
}
|
|
function notifitcation_popup(id) {
|
|
if (localStorage.getItem(checkboxes[id].value) != true) { verify = false; }
|
|
if (verify) { document.getElementById('notification').style.visibility = visible; }
|
|
} |