Geolocated snippets have an extra data attribute, data-country, that determines which country they should be available to. The JS should use the geolocation service at geo.mozilla.org to determine the user's country, and include snippets targeted at that country in the set of possible snippets. To avoid excessive traffic, we cache the user's country in localStorage for 30 days. In addition, we only download the user's country AFTER snippets are displayed; the geolocated snippets will show up next time the user hits about:home, and we avoid any delay in showing a snippet if the geolocation service is down.
…ipt loads This helps animated snippets play nicer with other snippets and ensures events fire at the right time.