Browse Source

Enable winter snow

pull/67/head
discomrade 1 year ago
parent
commit
b3db9c52b7
  1. 26
      js/winter-snow.js

26
js/winter-snow.js

@ -0,0 +1,26 @@
// hacky enabling of snowstorm, probably a better way
$(document).ready(function(){
var snow = localStorage['snow'] ? false : true;
if (window.Options && Options.get_tab('general')) {
selector = '#add-snow>input';
event = 'change';
Options.extend_tab("general", "<label id='add-snow'><input type='checkbox' />"+_('Snow! (requires refresh)')+"</label>");
}
$(selector)
.on(event, function() {
snow = !snow;
if (snow) {
delete localStorage.snow;
} else {
localStorage.snow = false;
}
});
if (snow) {
if (window.Options && Options.get_tab('general')) {
$('#add-snow>input').prop('checked', true);
}
$.getScript( "/js/snowstorm.js", function() {snowStorm.snowCharacter="&bull;";snowStorm.start();});
}
});
Loading…
Cancel
Save