Add cookie support
This commit is contained in:
parent
9f90b8edd5
commit
22a8fb2d75
@ -92,6 +92,12 @@
|
|||||||
}
|
}
|
||||||
function easterEgg(easterEggState) {
|
function easterEgg(easterEggState) {
|
||||||
console.log("Easter egg state is: " + easterEggState);
|
console.log("Easter egg state is: " + easterEggState);
|
||||||
|
// Check existing site state before updating it (prevents the site from hanging when you use the drawDesign function)
|
||||||
|
if ((/true/).test(getCookie("easterEggState") == easterEggState) {
|
||||||
|
console("Easter egg state already set! Ignoring request...");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (easterEggState) {
|
if (easterEggState) {
|
||||||
document.cookie = "easterEggState=true";
|
document.cookie = "easterEggState=true";
|
||||||
document.body.style.backgroundImage = "url(https://files.calebfontenot.com/blahaj-bl%C3%A5haj.gif)";
|
document.body.style.backgroundImage = "url(https://files.calebfontenot.com/blahaj-bl%C3%A5haj.gif)";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user