Cross origin is a pain, especially when using the file:// protocol. I venture that you have modified the security restrictions in your version of Firefox when working with loading local JSON because it binds up in a vanilla firefox install from my testing. That said we can solve this cross origin issue in Firefox but not Chrome because Chrome has a bug currently. All this can be run under a webserver like python -m SimpleHTTPServer as well for the non firefox peeps.
SOLUTION
Makes states data a script so it doesn't need to be ajaxed
Removed ajax step from main-p and main-r and replaced them with just
the image loader portions. Renamed to loadFlags
There is a cross origin image loading issue in chrome but this works in
firefox without security modifications
PROBLEM
Cross origin is a pain, especially when using the
file://
protocol. I venture that you have modified the security restrictions in your version of Firefox when working with loading local JSON because it binds up in a vanilla firefox install from my testing. That said we can solve this cross origin issue in Firefox but not Chrome because Chrome has a bug currently. All this can be run under a webserver likepython -m SimpleHTTPServer
as well for the non firefox peeps.SOLUTION
Makes states data a script so it doesn't need to be ajaxed Removed ajax step from main-p and main-r and replaced them with just the image loader portions. Renamed to loadFlags
There is a cross origin image loading issue in chrome but this works in firefox without security modifications