From aa6581fb85a712179197598f0e0d5756ac28c4e6 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sun, 14 Apr 2013 19:27:15 -0700 Subject: [PATCH 01/13] Make any nickname class element clickible to fill @ nick in chat --- code/chat.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/code/chat.js b/code/chat.js index 919ce854..6efaf839 100644 --- a/code/chat.js +++ b/code/chat.js @@ -241,7 +241,8 @@ window.chat.renderFull = function(oldMsgsWereAdded) { // common // -window.chat.nicknameClicked = function(event, nickname) { +window.chat.nicknameClicked = function(event, nickname, dom) { + nickname = nickname ? nickname : $(dom).text(); var hookData = { event: event, nickname: nickname }; if (window.runHooks('nicknameClicked', hookData)) { @@ -410,7 +411,7 @@ 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){ @@ -589,7 +590,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, null, this); + }); } From eb7d021449450e0db70058fa3553bee6a3f041a3 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sun, 14 Apr 2013 19:32:07 -0700 Subject: [PATCH 02/13] Double space issue when clicking a nickname with a space already present in chat --- code/chat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/chat.js b/code/chat.js index 6efaf839..2038c2bf 100644 --- a/code/chat.js +++ b/code/chat.js @@ -416,7 +416,7 @@ window.chat.renderMsg = function(msg, nick, time, team, msgToPlayer, systemNarro 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() } From e4d3c0d9f0a5742ac3520dad775caaa85c89d38d Mon Sep 17 00:00:00 2001 From: Kevin Date: Sun, 14 Apr 2013 19:42:05 -0700 Subject: [PATCH 03/13] Change cursor to pointer on any nickname class element --- style.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/style.css b/style.css index c208f48e..96247477 100644 --- a/style.css +++ b/style.css @@ -68,6 +68,10 @@ body { color: #fff; } +.nickname { + cursor: pointer !important; +} + a { color: #ffce00; cursor: pointer; From 6b04ee4939992444a9889804bc0014028a9e8358 Mon Sep 17 00:00:00 2001 From: Kevin Date: Tue, 16 Apr 2013 15:04:26 -0700 Subject: [PATCH 04/13] Don't modify nicknameClicked function, pull name in event calling function --- code/chat.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/chat.js b/code/chat.js index 2038c2bf..df42dd2a 100644 --- a/code/chat.js +++ b/code/chat.js @@ -241,8 +241,7 @@ window.chat.renderFull = function(oldMsgsWereAdded) { // common // -window.chat.nicknameClicked = function(event, nickname, dom) { - nickname = nickname ? nickname : $(dom).text(); +window.chat.nicknameClicked = function(event, nickname) { var hookData = { event: event, nickname: nickname }; if (window.runHooks('nicknameClicked', hookData)) { @@ -593,7 +592,7 @@ window.chat.setup = function() { $('#chatinput mark').addClass(cls); $(window).on('click', '.nickname', function(event) { - window.chat.nicknameClicked(event, null, this); + window.chat.nicknameClicked(event, $(this).text()); }); } From 0a1857130897741046e45ad55cb42f0464c9adb0 Mon Sep 17 00:00:00 2001 From: vita10gy Date: Tue, 16 Apr 2013 23:04:06 -0500 Subject: [PATCH 05/13] Fix desktop geosearch on mobile #154. Mobile seems messed up though. (Even without these changes.) Not sure if something is off with my build, or if something else changed. This should fix though. --- mobile/smartphone.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mobile/smartphone.css b/mobile/smartphone.css index ff2ead8a..fa7e937a 100644 --- a/mobile/smartphone.css +++ b/mobile/smartphone.css @@ -19,6 +19,14 @@ body { } +#geosearch{ + width:301px; +} + +#geosearchwrapper img{ + display:none; +} + #chatcontrols { height: 38px; width: 100%; From 86a7996db56dc921f8add7ab2ecd8925bfc91b48 Mon Sep 17 00:00:00 2001 From: Kevin Date: Wed, 17 Apr 2013 22:53:14 -0700 Subject: [PATCH 06/13] Change portal image urls to https if necessary in the portal object --- code/map_data.js | 10 +++++++++- code/portal_detail_display.js | 5 +---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/code/map_data.js b/code/map_data.js index 45af74c3..317d7877 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; From 07a07b0e24e29844a32b80aca64391b8e8c9817c Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Thu, 18 Apr 2013 15:39:17 +0100 Subject: [PATCH 07/13] mapquest map tiles support for https access --- code/boot.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/boot.js b/code/boot.js index 130f9265..59e54a7f 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); From f56f802d2c456cfe8bea5375052b88d909ca7f77 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Thu, 18 Apr 2013 15:46:52 +0100 Subject: [PATCH 08/13] additional fix #175 - should be ok now --- mobile/smartphone.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mobile/smartphone.css b/mobile/smartphone.css index fa7e937a..804f6a29 100644 --- a/mobile/smartphone.css +++ b/mobile/smartphone.css @@ -19,12 +19,12 @@ body { } -#geosearch{ - width:301px; +#geosearch { + width: 100%; } -#geosearchwrapper img{ - display:none; +#geosearchwrapper img { + display: none; } #chatcontrols { From 92bfd70eb042e07b584942b2442f04a8b23682d8 Mon Sep 17 00:00:00 2001 From: Xelio Date: Sat, 20 Apr 2013 02:39:10 +0800 Subject: [PATCH 09/13] Plugin AP List: Update description to reflect function changes --- plugins/ap-list.user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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* From d9f968a4bbbc29682e03bd2ce2a646cb1ac44d7f Mon Sep 17 00:00:00 2001 From: Peter Dietrich Date: Sat, 20 Apr 2013 00:28:15 +0200 Subject: [PATCH 10/13] Update ipas plugin to pass shield info --- plugins/ipas-link.user.js | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/plugins/ipas-link.user.js b/plugins/ipas-link.user.js index 50f7c994..814c6b6a 100644 --- a/plugins/ipas-link.user.js +++ b/plugins/ipas-link.user.js @@ -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() { From 4b7a3103079c90d947c2d0c3eb08d453a24bbfcd Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Sat, 20 Apr 2013 03:09:31 +0100 Subject: [PATCH 11/13] bump ipas plugin version number --- plugins/ipas-link.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ipas-link.user.js b/plugins/ipas-link.user.js index 814c6b6a..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@@ From 5eb7344895ae0991b4b3cac12ffe765c62a0e2f4 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Sun, 21 Apr 2013 02:13:52 +0100 Subject: [PATCH 12/13] increase maxZoom of google satellite/hybrid modes by two levels, so it matches max zoom of google maps --- code/boot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/boot.js b/code/boot.js index 59e54a7f..caaad95f 100644 --- a/code/boot.js +++ b/code/boot.js @@ -129,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}) ]; From e5079bc991ab50fd101cfc29af7feb2e89e59554 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Sun, 21 Apr 2013 14:38:54 +0100 Subject: [PATCH 13/13] increase length of scale bar --- plugins/scale-bar.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;