wet-boew/wet-boew — pull request #3684 by nschonni (2013-11-21 00:06:13+00:00)
Title: [WIP] V4 Country Content

# DO NOT MERGE

I got a request for a plug-in to support client side replacement of content based on a visitors location. This is currently structured as a inline example, but it will be moved to JEP plug-in. freegeoip.net was chosen because it doesn't require an API key to use, but it does have a 10K per IP/hour limit which may cause issues for large organizations behind a proxy.

TODO:
- [ ] Store location so repeated calls aren't required between page visits. sessionStorage or localStorage.
- [ ] Handle case where the country resolves, but there is not data-ajax-replace content available.
- [ ] Move to JEP plug-in model
- [ ] Offer opt-out to restore default content?
- [ ] Error handling for freegeoip.net failure.
- [ ] Whitelist countries available for swap?
- [ ] Map to a larger geograpic area (EX; ca, us, and mx -> North America)?
- [ ] Remove Gruntfile `watch:demos` to separate PR. Currently used for rapid demo rebuild

Related to #3577