BUGFIX: Fixed seasonal event handling.

This commit is contained in:
n1474335 2016-12-14 13:12:04 +00:00
parent 351eef7fd9
commit e2e68dd876
6 changed files with 16 additions and 15 deletions

View file

@ -25,8 +25,8 @@ SeasonalWaiter.prototype.load = function() {
if (now.getMonth() == 11 && now.getDate() > 12) { // Dec 13 -> Dec 31
this.app.options.snow = false;
this.create_snow_option();
this.manager.add_dynamic_listener(".option-item input:checkbox[option='snow']", "switchChange.bootstrapSwitch", this.let_it_snow, this);
this.manager.add_window_listener("resize", this.let_it_snow, this);
$(document).on("switchChange.bootstrapSwitch", ".option-item input:checkbox[option='snow']", this.let_it_snow.bind(this));
window.addEventListener("resize", this.let_it_snow.bind(this));
this.manager.add_listeners(".btn", "click", this.shake_off_snow, this);
if (now.getDate() == 25) this.let_it_snow();
}
@ -158,6 +158,7 @@ SeasonalWaiter.prototype.let_it_snow = function() {
$(document).snowfall(options);
};
/**
* When a button is clicked, shake the snow off that button.
* #letitsnow