diff --git a/code/boot.js b/code/boot.js
index 130f9265..caaad95f 100644
--- a/code/boot.js
+++ b/code/boot.js
@@ -118,8 +118,9 @@ window.setupMap = function() {
//MapQuest offer tiles - http://developer.mapquest.com/web/products/open/map
//their usage policy has no limits (except required notification above 4000 tiles/sec - we're perhaps at 50 tiles/sec based on CloudMade stats)
var mqSubdomains = [ 'otile1','otile2', 'otile3', 'otile4' ];
+ var mqTileUrlPrefix = window.location.protocol !== 'https:' ? 'http://{s}.mqcdn.com' : 'https://{s}-s.mqcdn.com';
var mqMapOpt = {attribution: osmAttribution+', Tiles Courtesy of MapQuest', mazZoom: 18, detectRetena: true, subdomains: mqSubdomains};
- var mqMap = new L.TileLayer('http://{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg',mqMapOpt);
+ var mqMap = new L.TileLayer(mqTileUrlPrefix+'/tiles/1.0.0/map/{z}/{x}/{y}.jpg',mqMapOpt);
//MapQuest satellite coverage outside of the US is rather limited - so not really worth having as we have google as an option
//var mqSatOpt = {attribution: 'Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency', mazZoom: 18, detectRetena: true, subdomains: mqSubdomains};
//var mqSat = new L.TileLayer('http://{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg',mqSatOpt);
@@ -128,8 +129,8 @@ window.setupMap = function() {
/*0*/ mqMap,
/*1*/ new L.Google('INGRESS'),
/*2*/ new L.Google('ROADMAP'),
- /*3*/ new L.Google('SATELLITE'),
- /*4*/ new L.Google('HYBRID')
+ /*3*/ new L.Google('SATELLITE',{maxZoom:20}),
+ /*4*/ new L.Google('HYBRID',{maxZoom:20})
];
diff --git a/code/chat.js b/code/chat.js
index 919ce854..df42dd2a 100644
--- a/code/chat.js
+++ b/code/chat.js
@@ -410,12 +410,12 @@ window.chat.renderMsg = function(msg, nick, time, team, msgToPlayer, systemNarro
var s = 'style="cursor:pointer; color:'+color+'"';
var title = nick.length >= 8 ? 'title="'+nick+'" class="help"' : '';
var i = ['<', '>'];
- return '
'+t+' | '+i[0]+''+ nick+''+i[1]+' | '+msg+' |
';
+ return ''+t+' | '+i[0]+''+ nick+''+i[1]+' | '+msg+' |
';
}
window.chat.addNickname= function(nick){
var c = document.getElementById("chattext");
- c.value = [c.value, nick, " "].join(" ").trim() + " ";
+ c.value = [c.value.trim(), nick].join(" ").trim() + " ";
c.focus()
}
@@ -589,7 +589,11 @@ window.chat.setup = function() {
window.requests.addRefreshFunction(chat.request);
var cls = PLAYER.team === 'ALIENS' ? 'enl' : 'res';
- $('#chatinput mark').addClass(cls)
+ $('#chatinput mark').addClass(cls);
+
+ $(window).on('click', '.nickname', function(event) {
+ window.chat.nicknameClicked(event, $(this).text());
+ });
}
diff --git a/code/map_data.js b/code/map_data.js
index 8f9a42d4..f367284b 100644
--- a/code/map_data.js
+++ b/code/map_data.js
@@ -105,7 +105,15 @@ window.handleDataResponse = function(data, textStatus, jqXHR) {
&& urlPortal !== ent[0]
) return;
-
+ if('imageByUrl' in ent[2] && 'imageUrl' in ent[2].imageByUrl) {
+ if(window.location.protocol === 'https:') {
+ ent[2].imageByUrl.imageUrl = ent[2].imageByUrl.imageUrl.indexOf('www.panoramio.com') !== -1
+ ? ent[2].imageByUrl.imageUrl.replace(/^http:\/\/www/, 'https://ssl').replace('small', 'medium')
+ : ent[2].imageByUrl.imageUrl.replace(/^http:\/\//, '//');
+ }
+ } else {
+ ent[2].imageByUrl = {'imageUrl': DEFAULT_PORTAL_IMG};
+ }
ppp.push(ent); // delay portal render
} else if(ent[2].edge !== undefined) {
diff --git a/code/portal_detail_display.js b/code/portal_detail_display.js
index 8937da8f..636230ed 100644
--- a/code/portal_detail_display.js
+++ b/code/portal_detail_display.js
@@ -44,10 +44,7 @@ window.renderPortalDetails = function(guid) {
var resoDetails = '' + getResonatorDetails(d) + '
';
setPortalIndicators(d);
- var img = d.imageByUrl && d.imageByUrl.imageUrl
- ? d.imageByUrl.imageUrl
- : DEFAULT_PORTAL_IMG;
-
+ var img = d.imageByUrl.imageUrl;
var lat = d.locationE6.latE6;
var lng = d.locationE6.lngE6;
var perma = '/intel?latE6='+lat+'&lngE6='+lng+'&z=17&pguid='+guid;
diff --git a/mobile/smartphone.css b/mobile/smartphone.css
index 210a79a8..43a595cc 100644
--- a/mobile/smartphone.css
+++ b/mobile/smartphone.css
@@ -19,6 +19,14 @@ body {
}
+#geosearch {
+ width: 100%;
+}
+
+#geosearchwrapper img {
+ display: none;
+}
+
#chatcontrols {
height: 38px;
width: 100%;
diff --git a/plugins/ap-list.user.js b/plugins/ap-list.user.js
index c8a4d575..9bf1c09a 100644
--- a/plugins/ap-list.user.js
+++ b/plugins/ap-list.user.js
@@ -1,11 +1,11 @@
// ==UserScript==
// @id iitc-plugin-ap-list@xelio
// @name IITC plugin: AP List
-// @version 0.5.1.@@DATETIMEVERSION@@
+// @version 0.5.2.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
-// @description [@@BUILDNAME@@-@@BUILDDATE@@] List top 10 portals by AP of either faction. Other functions and controls please refer to the Userguide.
+// @description [@@BUILDNAME@@-@@BUILDDATE@@] List portals by AP of either faction or by effective level. Other functions and controls please refer to the Userguide.
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*
diff --git a/plugins/ipas-link.user.js b/plugins/ipas-link.user.js
index 50f7c994..ac158c10 100644
--- a/plugins/ipas-link.user.js
+++ b/plugins/ipas-link.user.js
@@ -1,7 +1,7 @@
// ==UserScript==
// @id iitc-plugin-ipas-link@graphracer
// @name IITC Plugin: simulate an attack on portal
-// @version 0.1.1.@@DATETIMEVERSION@@
+// @version 0.2.0.@@DATETIMEVERSION@@
// @namespace https://github.com/xosofox/IPAS
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
@@ -30,16 +30,34 @@ window.plugin.ipasLink.addLink = function(d) {
$('.linkdetails').append('');
}
-window.plugin.ipasLink.getHash = function(d) {
- var hashParts=[];
- $.each(d.resonatorArray.resonators, function(ind, reso) {
- if (reso) {
- hashParts.push(reso.level + "," + reso.distanceToPortal + "," + reso.energyTotal);
- } else {
- hashParts.push(1 + "," + 35 + "," + 0); // Dummy values, the only important one is energy=0
- }
- });
- return hashParts.join(";")+"|" + "0,0,0,0"; //shields not implemented yet
+window.plugin.ipasLink.getHash = function (d) {
+ var hashParts = [];
+ $.each(d.resonatorArray.resonators, function (ind, reso) {
+ if (reso) {
+ hashParts.push(reso.level + "," + reso.distanceToPortal + "," + reso.energyTotal);
+ } else {
+ hashParts.push("1,20,0");
+ }
+ });
+ var resos = hashParts.join(";");
+
+ hashParts = [];
+ $.each(d.portalV2.linkedModArray, function (ind, mod) {
+ //shields only, so far...
+ var s = "0";
+ if (mod) {
+ if (mod.type === "RES_SHIELD") {
+ s = mod.rarity.charAt(0).toLowerCase();
+ }
+ }
+ hashParts.push(s);
+ });
+ var shields = hashParts.join(",");
+ return resos + "|" + shields;
+}
+
+var setup = function () {
+ window.plugin.ipasLink.setupCallback();
}
var setup = function() {
diff --git a/plugins/scale-bar.user.js b/plugins/scale-bar.user.js
index 5e784c12..23329456 100644
--- a/plugins/scale-bar.user.js
+++ b/plugins/scale-bar.user.js
@@ -28,7 +28,7 @@ window.plugin.scaleBar.setup = function() {
// Before you ask: yes, I explicitely turned off imperial units. Imperial units
// are worse than Internet Explorer 6 whirring fans combined. Upgrade to the metric
// system already.
- window.map.addControl(new L.Control.Scale({position: 'topleft', imperial: false}));
+ window.map.addControl(new L.Control.Scale({position: 'topleft', imperial: false, maxWidth: 200}));
};
var setup = window.plugin.scaleBar.setup;
diff --git a/style.css b/style.css
index 83688d54..f86398d2 100644
--- a/style.css
+++ b/style.css
@@ -68,6 +68,10 @@ body {
color: #fff;
}
+.nickname {
+ cursor: pointer !important;
+}
+
a {
color: #ffce00;
cursor: pointer;