scottschiller / Snowstorm

Enterprise-grade JavaScript snow effect for the internets, setting CPUs on fire worldwide every winter since 2003.
http://www.schillmania.com/projects/snowstorm/
Other
538 stars 144 forks source link

snow should freeze if the page is loaded in the background #1

Closed welwood08 closed 13 years ago

welwood08 commented 13 years ago

I got as far as disabling all my add-ons before I worked out Firefox's extra CPU usage was caused by having a tab (2 in my case) with snow open that I hadn't switched to in the current session.

Since it's impossible to detect if the window is already blurred on load, I was thinking of changing it to only start after the user moves their mouse. Naturally, freezeOnBlur=false would bypass this.

Any obvious problems with doing that I may have missed?

scottschiller commented 13 years ago

This sounds like a good idea. If you don't have one yet, feel free to fork SnowStorm, commit your change and make a pull request! Focus/blur can be a bit buggy, and this is an edge case I don't think I have covered.

I'm in the midst of tinkering with some new features, but I shouldn't have any problem merging this idea in also.

scottschiller commented 13 years ago

Merged and closed; looks to be all good! Thanks for the contribution.