Make map structure (continents) available to greasemonkey

I'd like to be able to write a GreaseMonkey script that calculated continent bonuses, the desireability of continents, etc. This requires the game putting information about the structure of the map in a place where a GreaseMonkey script can pick it up.
Troy's marvellous script now appears to pick up information about which players have how many armies in how many countries by parsing an argument string to map.php. This is crude.
I think it would be sufficient to have an array of countries, containing for each country:
Plus an array relating ID of continent to bonus for holding that continent. (Maybe also the ID of the player, if any, entitled to that continent bonus.)
Troy's marvellous script now appears to pick up information about which players have how many armies in how many countries by parsing an argument string to map.php. This is crude.
I think it would be sufficient to have an array of countries, containing for each country:
- * ID of playing occupying that country
* Number of armies in that country
* ID of continent to which that country belongs
Plus an array relating ID of continent to bonus for holding that continent. (Maybe also the ID of the player, if any, entitled to that continent bonus.)