dev

This script/stylesheet is for PERSONAL use only!

You are free to install this script/stylesheet for yourself, but it is not allowed to be used wiki-wide (e.g., in MediaWiki:ImportJS, MediaWiki:Common.js, MediaWiki:Common.css, MediaWiki:Fandomdesktop.js, MediaWiki:Fandomdesktop.css, or MediaWiki:FandomMobile.css), as it would violate Fandom's Terms of Use.
(See the customization policy)

SnowStorm adds animated, customizable, JavaScript snow on a wiki.

Installation

Configuration

The script can be used as it is, but it does also support these customizable variables that can be added before the import. All variables belong under the window.snowStorm global object.

Variable Description Default value Type
autoStart Whether the snow should start automatically or not. true boolean
snowCfg_onlyOasis Whether should be run only in Oasis or not. true boolean
excludeMobile Snow is likely to be bad news for mobile phones' CPUs (and batteries). Enable at your own risk. true boolean
flakesMax Limit total amount of snow made (falling + sticking). 128 number
flakesMaxActive Limit amount of snow falling at once (less = lower CPU use). 64 number
animationInterval Theoretical "milliseconds per frame" measurement. 20 = fast + smooth, but high CPU use. 50 = more conservative, but slower. 35 number
useGPU Enable transform-based hardware acceleration, reduce CPU load. true boolean
className CSS class name for further customization on snow elements. null string
flakeBottom Integer for Y axis snow limit, 0 or null for "full-screen" snow effect. null number
followMouse Snow movement can respond to the user's mouse. true boolean
snowColor Snow color. #fff string
snowCharacter Character to use as snowflake. • () string
snowStick Whether or not snow should "stick" at the bottom. When off, will never collect. true boolean
targetElement Element which snow will be appended to (null = document.body), can be an element ID e.g. myDiv or a DOM node reference. null string
useMeltEffect When recycling fallen snow (or rarely, when falling), have it "melt" and fade out if browser supports it. true boolean
useTwinkleEffect Allow snow to randomly "flicker" in and out of view while falling. false boolean
usePositionFixed true = snow does not shift vertically when scrolling. May increase CPU load, if enabled, used only where supported. false boolean
usePixelPosition Whether to use pixel values for snow top/left vs. percentages. Auto-enabled if body is position:relative or targetElement is specified. false boolean
Less used
freezeOnBlur Only snow when the window is in focus (foreground). Saves CPU. Note: if the snow randomly speeds up after some time while changing tab focus (especially on Chrome), turning this off should solve the problem. true boolean
flakeLeftOffset Left margin/gutter space on edge of container (e.g. browser window). Bump up these values if seeing horizontal scrollbars. 0 number
flakeWidth Max pixel width reserved for snow element. 8 number
flakeHeight Max pixel height reserved for snow element. 8 number
vMaxX Defines maximum X velocity for the storm; a random value in this range is selected for each snowflake. 5 number
vMaxY Defines maximum Y velocity for the storm; a random value in this range is selected for each snowflake. 4 number
zIndex CSS stacking order applied to each snowflake. 1 number
windOffset 1 number
windMultiplier 2 number
flakeTypes 6 number

Changelog

Date Notes Updated by
December 1st, 2012 First version XD1
May 13th, 2016 Added Rappy
December 2nd, 2016 1) previously you could not set "false" or "null" custom values 2) added "onlyoasis" option 3) made available extra customizations leviathan 89
August 30, 2021 UCP fixes Thundercraft5
Text above can be found here (edit)