replace half space with normal space because some browsers do not support it

This commit is contained in:
Stefan Breunig 2013-02-16 13:43:05 +01:00
parent e1fd13e4af
commit 9cb2722eb2
2 changed files with 5 additions and 5 deletions

View File

@ -8,8 +8,8 @@ window.getRangeText = function(d) {
return ['range',
'<a onclick="window.rangeLinkClick()">'
+ (range > 1000
? Math.round(range/1000) + 'km'
: Math.round(range) + 'm')
? Math.round(range/1000) + ' km'
: Math.round(range) + ' m')
+ '</a>'];
}
@ -73,7 +73,7 @@ window.getEnergyText = function(d) {
window.getAvgResoDistText = function(d) {
var avgDist = Math.round(10*getAvgResoDist(d))/10;
return ['reso dist', avgDist + 'm'];
return ['reso dist', avgDist + ' m'];
}
window.getResonatorDetails = function(d) {

View File

@ -34,7 +34,7 @@ window.writeCookie = function(name, val) {
// add thousand separators to given number.
// http://stackoverflow.com/a/1990590/1684530 by Doug Neiner.
window.digits = function(d) {
return (d+"").replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1");
return (d+"").replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1 ");
}
// posts AJAX request to Ingress API.
@ -200,7 +200,7 @@ if (typeof String.prototype.startsWith !== 'function') {
}
window.prettyEnergy = function(nrg) {
return nrg> 1000 ? Math.round(nrg/1000) + 'k': nrg;
return nrg> 1000 ? Math.round(nrg/1000) + ' k': nrg;
}
window.setPermaLink = function(elm) {