replace half space with normal space because some browsers do not support it
This commit is contained in:
parent
e1fd13e4af
commit
9cb2722eb2
@ -8,8 +8,8 @@ window.getRangeText = function(d) {
|
|||||||
return ['range',
|
return ['range',
|
||||||
'<a onclick="window.rangeLinkClick()">'
|
'<a onclick="window.rangeLinkClick()">'
|
||||||
+ (range > 1000
|
+ (range > 1000
|
||||||
? Math.round(range/1000) + ' km'
|
? Math.round(range/1000) + ' km'
|
||||||
: Math.round(range) + ' m')
|
: Math.round(range) + ' m')
|
||||||
+ '</a>'];
|
+ '</a>'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ window.getEnergyText = function(d) {
|
|||||||
|
|
||||||
window.getAvgResoDistText = function(d) {
|
window.getAvgResoDistText = function(d) {
|
||||||
var avgDist = Math.round(10*getAvgResoDist(d))/10;
|
var avgDist = Math.round(10*getAvgResoDist(d))/10;
|
||||||
return ['reso dist', avgDist + ' m'];
|
return ['reso dist', avgDist + ' m'];
|
||||||
}
|
}
|
||||||
|
|
||||||
window.getResonatorDetails = function(d) {
|
window.getResonatorDetails = function(d) {
|
||||||
|
@ -34,7 +34,7 @@ window.writeCookie = function(name, val) {
|
|||||||
// add thousand separators to given number.
|
// add thousand separators to given number.
|
||||||
// http://stackoverflow.com/a/1990590/1684530 by Doug Neiner.
|
// http://stackoverflow.com/a/1990590/1684530 by Doug Neiner.
|
||||||
window.digits = function(d) {
|
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.
|
// posts AJAX request to Ingress API.
|
||||||
@ -200,7 +200,7 @@ if (typeof String.prototype.startsWith !== 'function') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
window.prettyEnergy = function(nrg) {
|
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) {
|
window.setPermaLink = function(elm) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user