fix protocol-related error for http + https support

This commit is contained in:
Jon Atkins
2013-03-16 20:21:05 +00:00
parent 38f22989d6
commit bc5939818c
2 changed files with 6 additions and 11 deletions

View File

@ -62,7 +62,7 @@ window.postAjax = function(action, data, success, error) {
// 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: 'https://www.ingress.com/rpc/dashboard.'+action,
url: window.location.protocol + '//www.ingress.com/rpc/dashboard.'+action,
type: 'POST',
data: data,
dataType: 'json',
@ -108,7 +108,7 @@ window.rangeLinkClick = function() {
window.showPortalPosLinks = function(lat, lng) {
if (typeof android !== 'undefined' && android && android.intentPosLink) {
android.intentPosLink('https://maps.google.com/?q='+lat+','+lng);
android.intentPosLink(window.location.protocol + '//maps.google.com/?q='+lat+','+lng);
} else {
var qrcode = '<div id="qrcode"></div>';
var script = '<script>$(\'#qrcode\').qrcode({text:\'GEO:'+lat+','+lng+'\'});</script>';