diff --git a/script.js b/script.js index 21f1fc9..078fb35 100644 --- a/script.js +++ b/script.js @@ -507,7 +507,9 @@ var si = 0, if (el) { SERVERS.forEach(function(s) { var opt = document.createElement('option'); - opt.value = s.host; + // Extract city from host: api.saopaulo.odoo4projects.com -> saopaulo + var cityVal = s.host.replace('api.', '').replace('.odoo4projects.com', ''); + opt.value = cityVal; opt.textContent = s.city; el.appendChild(opt); });