remove unnecessary absolute URLs. site-relative are used where possible (e.g. permalinks, rpc calls) - and a couple of protocol-relative one for automatic http/https matching

This commit is contained in:
Jon Atkins
2013-04-08 05:09:01 +01:00
parent f48aca8864
commit baaaf3e3f1
7 changed files with 11 additions and 13 deletions

View File

@ -59,10 +59,7 @@ window.postAjax = function(action, data, success, error) {
var remove = function(data, textStatus, jqXHR) { window.requests.remove(jqXHR); };
var errCnt = function(jqXHR) { window.failedRequestCount++; window.requests.remove(jqXHR); };
var result = $.ajax({
// use full URL to avoid issues depending on how people set their
// slash. See:
// https://github.com/breunigs/ingress-intel-total-conversion/issues/56
url: window.location.protocol + '//www.ingress.com/rpc/dashboard.'+action,
url: '/rpc/dashboard.'+action,
type: 'POST',
data: data,
dataType: 'json',
@ -261,7 +258,7 @@ window.setPermaLink = function(elm) {
var lat = Math.round(c.lat*1E6);
var lng = Math.round(c.lng*1E6);
var qry = 'latE6='+lat+'&lngE6='+lng+'&z=' + (map.getZoom()-1);
$(elm).attr('href', 'https://www.ingress.com/intel?' + qry);
$(elm).attr('href', '/intel?' + qry);
}
window.uniqueArray = function(arr) {