Merge branch 'master' into highlighter
This commit is contained in:
@ -231,7 +231,7 @@ window.setupPlayerStat = function() {
|
||||
+ '<h2 title="'+t+'">'+level+' '
|
||||
+ '<div id="name">'
|
||||
+ '<span class="'+cls+'">'+PLAYER.nickname+'</span>'
|
||||
+ '<a href="https://www.ingress.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttps://www.ingress.com/intel%26service%3Dah" id="signout">sign out</a>'
|
||||
+ '<a href="/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttps://www.ingress.com/intel%26service%3Dah" id="signout">sign out</a>'
|
||||
+ '</div>'
|
||||
+ '<div id="stats">'
|
||||
+ '<sup>XM: '+xmRatio+'%</sup>'
|
||||
@ -386,6 +386,7 @@ try { console.log('Loading included JS now'); } catch(e) {}
|
||||
|
||||
try { console.log('done loading included JS'); } catch(e) {}
|
||||
|
||||
//note: no protocol - so uses http or https as used on the current page
|
||||
var JQUERY = 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js';
|
||||
var JQUERYUI = 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js';
|
||||
|
||||
|
32
code/chat.js
32
code/chat.js
@ -292,7 +292,7 @@ window.chat.writeDataToHash = function(newData, storageHash, isPublicChannel) {
|
||||
|
||||
case 'PORTAL':
|
||||
var latlng = [markup[1].latE6/1E6, markup[1].lngE6/1E6];
|
||||
var perma = 'https://ingress.com/intel?latE6='+markup[1].latE6+'&lngE6='+markup[1].lngE6+'&z=17&pguid='+markup[1].guid;
|
||||
var perma = '/intel?latE6='+markup[1].latE6+'&lngE6='+markup[1].lngE6+'&z=17&pguid='+markup[1].guid;
|
||||
var js = 'window.zoomToAndShowPortal(\''+markup[1].guid+'\', ['+latlng[0]+', '+latlng[1]+']);return false';
|
||||
|
||||
msg += '<a onclick="'+js+'"'
|
||||
@ -606,21 +606,23 @@ window.chat.setupTime = function() {
|
||||
|
||||
|
||||
window.chat.setupPosting = function() {
|
||||
$('#chatinput input').keydown(function(event) {
|
||||
try {
|
||||
var kc = (event.keyCode ? event.keyCode : event.which);
|
||||
if(kc === 13) { // enter
|
||||
chat.postMsg();
|
||||
event.preventDefault();
|
||||
} else if (kc === 9) { // tab
|
||||
event.preventDefault();
|
||||
window.chat.handleTabCompletion();
|
||||
if (!isSmartphone()) {
|
||||
$('#chatinput input').keydown(function(event) {
|
||||
try {
|
||||
var kc = (event.keyCode ? event.keyCode : event.which);
|
||||
if(kc === 13) { // enter
|
||||
chat.postMsg();
|
||||
event.preventDefault();
|
||||
} else if (kc === 9) { // tab
|
||||
event.preventDefault();
|
||||
window.chat.handleTabCompletion();
|
||||
}
|
||||
} catch(error) {
|
||||
console.log(error);
|
||||
debug.printStackTrace();
|
||||
}
|
||||
} catch(error) {
|
||||
console.log(error);
|
||||
debug.printStackTrace();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$('#chatinput').submit(function(event) {
|
||||
event.preventDefault();
|
||||
|
@ -50,7 +50,7 @@ window.renderPortalDetails = function(guid) {
|
||||
|
||||
var lat = d.locationE6.latE6;
|
||||
var lng = d.locationE6.lngE6;
|
||||
var perma = 'https://ingress.com/intel?latE6='+lat+'&lngE6='+lng+'&z=17&pguid='+guid;
|
||||
var perma = '/intel?latE6='+lat+'&lngE6='+lng+'&z=17&pguid='+guid;
|
||||
var imgTitle = 'title="'+getPortalDescriptionFromDetails(d)+'\n\nClick to show full image."';
|
||||
var poslinks = 'window.showPortalPosLinks('+lat/1E6+','+lng/1E6+',\'' + d.portalV2.descriptiveText.TITLE + '\')';
|
||||
var postcard = 'Send in a postcard. Will put it online after receiving. Address:\\n\\nStefan Breunig\\nINF 305 – R045\\n69120 Heidelberg\\nGermany';
|
||||
|
@ -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) {
|
||||
|
Reference in New Issue
Block a user