mirror of
https://github.com/pierre42100/ComunicWeb
synced 2025-06-19 12:25:16 +00:00
Added easter egg (a pacman game)
This commit is contained in:
@ -79,7 +79,7 @@ ComunicWeb.pages.settings.sections.general = {
|
||||
});
|
||||
|
||||
//Display user ID
|
||||
createFormGroup({
|
||||
var userIDInput = createFormGroup({
|
||||
target: target,
|
||||
label: "User ID",
|
||||
type: "text",
|
||||
@ -88,6 +88,18 @@ ComunicWeb.pages.settings.sections.general = {
|
||||
additionalGroupClasses: "input-user-id"
|
||||
});
|
||||
|
||||
//Easter egg : open pacman when clicking 10 times on user ID input label
|
||||
var clicks = 0;
|
||||
userIDInput.parentNode.parentNode.addEventListener("click", function(){
|
||||
clicks++;
|
||||
|
||||
if(clicks >= 10) {
|
||||
ComunicWeb.components.pacman.open();
|
||||
clicks = 0;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
//Display user email
|
||||
createFormGroup({
|
||||
target: target,
|
||||
|
Reference in New Issue
Block a user