#12200 Added setup flag for easter egg

This commit is contained in:
Jorge Rincon 2023-11-24 14:01:17 +01:00
parent 4ba13ad0e7
commit 9f72dd7d6e
3 changed files with 7 additions and 5 deletions

View File

@ -1328,7 +1328,7 @@ if (is_ajax()) {
<tbody>
<tr>
<th style="width: 40%; border: 0px;">
<a href="javascript:christmas_click()">
<a href="javascript:christmas_click('.$config['eastern_eggs_disabled'].')">
<img src="'.$image_about.'" alt="logo" width="70%">
<input id="count_click" type="hidden" value="0" />
</a>

View File

@ -2558,11 +2558,11 @@ function WarningPeriodicityModal(title, message) {
});
}
function christmas_click() {
function christmas_click(flagEasternEgg) {
let counter = $("#count_click").val();
counter++;
$("#count_click").val(counter);
if (counter == 25) {
if (counter == 25 && flagEasternEgg == true) {
$("#container-snow").removeClass("invisible");
setTimeout(() => {
$("#container-snow").addClass("invisible");

View File

@ -1682,8 +1682,10 @@ require 'include/php_to_js_values.php';
$(document).ready(function() {
const date = new Date();
const today = date.toLocaleDateString();
const christmasDay = "25-12-2023";
if (today == christmasDay) {
const year = date.getFullYear();
const christmasDay = "25/12/"+year;
let flagEasternEgg = $("#flagEasternEgg").val();
if (today === christmasDay && flagEasternEgg == true) {
$("#container-snow").removeClass('invisible');
setTimeout(() => {
$("#container-snow").addClass('invisible');