Skip to content

Commit 86728f4

Browse files
committed
Allow testing the celebration by tapping the tagline six times
On mobile phones, it is a bit of a challenge to press the "2" key followed by the "0" key to test out the 20th anniversary celebrations. Implement a multi-tap listener for that, specifically on the "tagline" so as not to spoil the surprise by mistake. I considered requiring 20 taps because it is the 20th anniversary, but I also want to test efficiently, so there. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 4a1c91d commit 86728f4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

assets/js/application.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,18 @@ var GitTurns20 = {
111111
const today = new Date();
112112
if (today.getFullYear() === 2025 && today.getMonth() === 3 && today.getDate() === 7) {
113113
this.celebrate();
114+
} else {
115+
let start = 0
116+
let count = 0
117+
$("#tagline").click(e => {
118+
if (count === 0 || e.timeStamp > start + count * 1000) {
119+
start = e.timeStamp;
120+
count = 1;
121+
} else if (++count === 6) {
122+
this.celebrate();
123+
count = 0;
124+
}
125+
})
114126
}
115127
},
116128

0 commit comments

Comments
 (0)