diff --git a/code/utils_misc.js b/code/utils_misc.js index de0df1c6..2f982f7e 100644 --- a/code/utils_misc.js +++ b/code/utils_misc.js @@ -198,3 +198,11 @@ if (typeof String.prototype.startsWith !== 'function') { window.prettyEnergy = function(nrg) { return nrg> 1000 ? Math.round(nrg/1000) + ' k': nrg; } + +window.setPermaLink = function(elm) { + var c = map.getCenter(); + var lat = Math.round(c.lat*1E6); + var lng = Math.round(c.lng*1E6); + var qry = 'latE6='+lat+'&lngE6='+lng+'&z=' + map.getZoom(); + $(elm).attr('href', 'http://www.ingress.com/intel?' + qry); +} diff --git a/main.js b/main.js index 596b916f..c3453b4a 100644 --- a/main.js +++ b/main.js @@ -78,7 +78,7 @@ document.getElementsByTagName('body')[0].innerHTML = '' + ' ' + '
' + ' ' - + ' ' + + ' ' + ' ' + ' ' + ' '; diff --git a/style.css b/style.css index 19a0afc6..00185a17 100644 --- a/style.css +++ b/style.css @@ -519,6 +519,10 @@ aside:nth-child(odd) span { font-size:90%; } +#toolbox > a { + padding: 5px; +} + #spacer { /* cheap hack to prevent sidebar content being overlayed by the map * status box */