mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-04 12:14:12 +00:00 
			
		
		
		
	Manon's special easter egg
This commit is contained in:
		@@ -572,9 +572,39 @@ ComunicWeb.components.posts.ui = {
 | 
				
			|||||||
				type: "div",
 | 
									type: "div",
 | 
				
			||||||
				class: "post-countdown"
 | 
									class: "post-countdown"
 | 
				
			||||||
			});
 | 
								});
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			//Initialize countdown timer
 | 
								// Manon's birthday is a sacred day, like the end of the world
 | 
				
			||||||
			ComunicWeb.components.countdown.init(info.time_end, target);
 | 
								// nobody must know when it will happen !
 | 
				
			||||||
 | 
								//
 | 
				
			||||||
 | 
								// Psst: it is on May 25, 11h10m00s
 | 
				
			||||||
 | 
								//
 | 
				
			||||||
 | 
								// => Easter egg
 | 
				
			||||||
 | 
								//
 | 
				
			||||||
 | 
								const endDate = new Date(info.time_end*1000);
 | 
				
			||||||
 | 
								if(endDate.getMonth() == 4 && endDate.getDate() == 25 && endDate.getHours() == 11 && endDate.getMinutes() == 10) {
 | 
				
			||||||
 | 
									target.appendChild(ComunicWeb.common.messages.createCalloutElem("Hold up!", "You MAY NOT KNOW when this countdown will end!", "danger"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									createElem2({
 | 
				
			||||||
 | 
										appendTo: target,
 | 
				
			||||||
 | 
										type: "p",
 | 
				
			||||||
 | 
										innerHTML: "<strong>Ends in ∞ days ∞ hours ∞ minutes ∞ seconds</strong>"
 | 
				
			||||||
 | 
									})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									createElem2({
 | 
				
			||||||
 | 
										appendTo: target,
 | 
				
			||||||
 | 
										type: "p",
 | 
				
			||||||
 | 
										innerHTML: "This is not a common behavior of the Countdown timer. If you want this message to disappear, just create a new post with another end date..."
 | 
				
			||||||
 | 
									})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									add_p(target);
 | 
				
			||||||
 | 
									add_p(target);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								else
 | 
				
			||||||
 | 
									//Initialize countdown timer
 | 
				
			||||||
 | 
									ComunicWeb.components.countdown.init(info.time_end, target);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		//In case of survey
 | 
							//In case of survey
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user