mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 07:16:17 -04:00
BUGFIX: Fixed seasonal event handling.
This commit is contained in:
parent
351eef7fd9
commit
e2e68dd876
6 changed files with 16 additions and 15 deletions
|
@ -136,8 +136,8 @@ Manager.prototype.initialise_event_listeners = function() {
|
|||
// Options
|
||||
document.getElementById("options").addEventListener("click", this.options.options_click.bind(this.options));
|
||||
document.getElementById("reset-options").addEventListener("click", this.options.reset_options_click.bind(this.options));
|
||||
$(".option-item input:checkbox").on("switchChange.bootstrapSwitch", this.options.switch_change.bind(this.options));
|
||||
$(".option-item input:checkbox").on("switchChange.bootstrapSwitch", this.options.set_word_wrap.bind(this.options));
|
||||
$(document).on("switchChange.bootstrapSwitch", ".option-item input:checkbox", this.options.switch_change.bind(this.options));
|
||||
$(document).on("switchChange.bootstrapSwitch", ".option-item input:checkbox", this.options.set_word_wrap.bind(this.options));
|
||||
this.add_dynamic_listener(".option-item input[type=number]", "keyup", this.options.number_change, this.options);
|
||||
this.add_dynamic_listener(".option-item input[type=number]", "change", this.options.number_change, this.options);
|
||||
this.add_dynamic_listener(".option-item select", "change", this.options.select_change, this.options);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue