1
0

💫🛎 Checkpoint

./style.css:7435365/113
./script.js:7435365/519
./README.md:7435365/60
This commit is contained in:
Glitch (hello-webpage) 2019-10-06 19:26:50 +00:00
parent e78507a7cc
commit 416c3f6045
3 changed files with 21 additions and 8 deletions

View File

@ -1,3 +1,8 @@
Is It Jason's Birthday?
=======================
Welcome to Glitch
=================

View File

@ -2,11 +2,11 @@ var birthday = {
now: null,
day: 25,
month: 6, // June
match: false,
faking: false,
check: function() {
if (this.faking) return;
this.now = new Date();
if (this.now.getDate() == this.day && this.now.getMonth() + 1 == this.month)
this.activate();
if (this.now.getDate() == this.day && this.now.getMonth() + 1 == this.month) this.activate();
else this.deactivate();
},
activate: function() {
@ -21,6 +21,14 @@ var birthday = {
elementClass.add(document.getElementById("isit"), "nope");
confetti.clear();
},
fakeit: function() {
this.faking = true;
this.activate();
setTimeout(function() {
birthday.faking = false;
birthday.deactivate();
}, 5000)
}
};
@ -73,7 +81,10 @@ var elementClass = {
window.onload = function() {
birthday.check();
document.getElementById('pilink')
document.getElementById('pilink').addEventListener('click', function(e) {
e.preventDefault();
birthday.fakeit();
}, false)
};
window.addEventListener(

View File

@ -37,14 +37,11 @@ body {
right: 1vw;
font-family: 'Times New Roman', serif;
font-size: 1.2vw;
}
#pilink a {
text-decoration: none;
color: #6e7f80;
}
#pilink a:hover {
#pilink:hover {
color: #FF0000;
}