mirror of
https://github.com/OpenFusionProject/Client.git
synced 2024-11-22 13:40:06 +00:00
5d5dce9647
I had to hack the package.json to force `electron-prebuilt` to use a 32-bit binary - everything else should be fairly out of the box
19 lines
553 B
JavaScript
19 lines
553 B
JavaScript
// You're kind of ruining the surprise by reading this, but whatever
|
|
var today = new Date();
|
|
|
|
// Check Christmas season: Date constructor in Javascript uses an index
|
|
// so 11 is Dec. of this year, and 12 is Jan. of the next
|
|
var christmasBegin = new Date(today.getFullYear(), 11, 23);
|
|
var christmasEnd = new Date(today.getFullYear(), 12, 8);
|
|
var sf
|
|
|
|
if((today >= christmasBegin && today <= christmasEnd)) {
|
|
console.log("Christmas Activated.");
|
|
sf = new Snowflakes({zIndex: -100});
|
|
}
|
|
|
|
function stopEasterEggs(){
|
|
if (sf != null) {
|
|
sf.destroy();
|
|
}
|
|
} |