From 4024c67f3aa290d697eb44a7ac0ff96fb192d577 Mon Sep 17 00:00:00 2001 From: Xelio Date: Tue, 5 Mar 2013 16:23:38 +0800 Subject: [PATCH 01/11] Make style of buttons in dialog consistant. --- style.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/style.css b/style.css index 7b79982e..31270562 100644 --- a/style.css +++ b/style.css @@ -727,7 +727,8 @@ aside { text-align: right; } -.ui-dialog-buttonset button { +.ui-dialog-buttonset button, +.ui-dialog-content button { padding: 2px; min-width: 80px; color: #FFCE00; From dbda13112ebb0defe959683afbca965df7842614 Mon Sep 17 00:00:00 2001 From: Xelio Date: Tue, 5 Mar 2013 23:10:49 +0800 Subject: [PATCH 02/11] Bug fix in "isSameResonator" It was throwing error when only one of the resonator is null. --- code/map_data.js | 1 + 1 file changed, 1 insertion(+) diff --git a/code/map_data.js b/code/map_data.js index c8ccf116..3da36190 100644 --- a/code/map_data.js +++ b/code/map_data.js @@ -453,6 +453,7 @@ window.isResonatorsShow = function() { window.isSameResonator = function(oldRes, newRes) { if(!oldRes && !newRes) return true; + if(!oldRes || !newRes) return false; if(typeof oldRes !== typeof newRes) return false; if(oldRes.level !== newRes.level) return false; if(oldRes.energyTotal !== newRes.energyTotal) return false; From a4489125000134597172b2e5733268653fc5096b Mon Sep 17 00:00:00 2001 From: Morgan Jones Date: Tue, 5 Mar 2013 16:09:43 -0600 Subject: [PATCH 03/11] Fix display of HTTP error messages for code redemption --- code/redeeming.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/redeeming.js b/code/redeeming.js index 12bc5e32..0a0575b0 100644 --- a/code/redeeming.js +++ b/code/redeeming.js @@ -57,7 +57,7 @@ window.setupRedeem = function() { } else { extra = "The server indicated an error."; } - extra += "\n" + 'Response: HTTP ' + jq.status + "."; + extra += "\n" + 'Response: HTTP ' + response.status + "."; } else { extra = "No status code was returned."; } From 0d5275c385129c28a6524c452d7265f089875263 Mon Sep 17 00:00:00 2001 From: Stefan Breunig Date: Tue, 5 Mar 2013 23:23:26 +0100 Subject: [PATCH 04/11] typo that prevented smartphone style from being loaded --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 18c5c834..cfe5a743 100644 --- a/main.js +++ b/main.js @@ -67,7 +67,7 @@ document.getElementsByTagName('head')[0].innerHTML = '' + '' // this navigator check is also used in code/smartphone.js + (navigator.userAgent.match(/Android.*Mobile/) - ? + '' + ? '' : '') + ''; From b30ac36ffa026fc0bebe33745c38d1c21a52ac0f Mon Sep 17 00:00:00 2001 From: Stefan Breunig Date: Wed, 6 Mar 2013 00:02:28 +0100 Subject: [PATCH 05/11] fix style nits --- code/redeeming.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/redeeming.js b/code/redeeming.js index 0a0575b0..0792f17d 100644 --- a/code/redeeming.js +++ b/code/redeeming.js @@ -14,7 +14,7 @@ window.handleRedeemResponse = function(data, textStatus, jqXHR) { } else { error = 'There was a problem redeeming the passcode. Try again?'; } - alert('' + data.error + "\n" + error); + alert('' + data.error + '\n' + error); } else if (data.result) { var xmp_level = 0, xmp_count = 0; var res_level = 0, res_count = 0; @@ -40,7 +40,7 @@ window.handleRedeemResponse = function(data, textStatus, jqXHR) { } } - alert("Passcode accepted!\n" + [data.result.apAward + 'AP', data.result.xmAward + 'XM', xmp_count + 'xL' + xmp_level + ' XMP', res_count + 'xL' + res_level + ' RES', shield_count + 'x' + shield_rarity + ' SH'].join('/')); + alert('Passcode accepted!\n' + [data.result.apAward + 'AP', data.result.xmAward + 'XM', xmp_count + 'xL' + xmp_level + ' XMP', res_count + 'xL' + res_level + ' RES', shield_count + 'x' + shield_rarity + ' SH'].join('/')); } } @@ -53,13 +53,13 @@ window.setupRedeem = function() { var extra = ''; if (response && response.status) { if (response.status === 429) { - extra = "You have been rate-limited by the server. Wait a bit and try again."; + extra = 'You have been rate-limited by the server. Wait a bit and try again.'; } else { - extra = "The server indicated an error."; + extra = 'The server indicated an error.'; } - extra += "\n" + 'Response: HTTP ' + response.status + "."; + extra += '\nResponse: HTTP ' + response.status + '.'; } else { - extra = "No status code was returned."; + extra = 'No status code was returned.'; } alert('The HTTP request failed. ' + extra); }); From 55a9c92121ed212821482903529e3d19045f1e2b Mon Sep 17 00:00:00 2001 From: vita10gy Date: Tue, 5 Mar 2013 22:44:17 -0600 Subject: [PATCH 06/11] Weaken the impact sheilds have Now that shields can be exploded, lower their impact to roughly the equivilent of 3% more energy each. Hopefully this addresses issue #385 --- plugins/show-portal-weakness.user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/show-portal-weakness.user.js b/plugins/show-portal-weakness.user.js index c085f23e..6c8763e3 100644 --- a/plugins/show-portal-weakness.user.js +++ b/plugins/show-portal-weakness.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @id iitc-plugin-show-portal-weakness@vita10gy // @name iitc: show portal weakness -// @version 0.5 +// @version 0.6 // @namespace https://github.com/breunigs/ingress-intel-total-conversion // @updateURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/show-portal-weakness.user.js // @downloadURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/show-portal-weakness.user.js @@ -35,7 +35,7 @@ window.plugin.portalWeakness.portalAdded = function(data) { $.each(d.portalV2.linkedModArray, function(ind, mod) { if(mod === null) { missing_shields++; - portal_weakness += .08; + portal_weakness += .03; } }); //Ding the portal for every missing resonator. From d591b714a32aa1857c0ec03c09aeb6902c8042a6 Mon Sep 17 00:00:00 2001 From: Xelio Date: Wed, 6 Mar 2013 13:35:18 +0800 Subject: [PATCH 07/11] Bug fix: handleDataResponse in map_data It throw error when val.deletedGameEntityGuids or val.gameEntities is null --- code/map_data.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/map_data.js b/code/map_data.js index 3da36190..34b34590 100644 --- a/code/map_data.js +++ b/code/map_data.js @@ -81,7 +81,7 @@ window.handleDataResponse = function(data, textStatus, jqXHR) { var ppp = []; var p2f = {}; $.each(m, function(qk, val) { - $.each(val.deletedGameEntityGuids, function(ind, guid) { + $.each(val.deletedGameEntityGuids || [], function(ind, guid) { if(getTypeByGuid(guid) === TYPE_FIELD && window.fields[guid] !== undefined) { $.each(window.fields[guid].options.vertices, function(ind, vertex) { if(window.portals[vertex.guid] === undefined) return true; @@ -92,7 +92,7 @@ window.handleDataResponse = function(data, textStatus, jqXHR) { window.removeByGuid(guid); }); - $.each(val.gameEntities, function(ind, ent) { + $.each(val.gameEntities || [], function(ind, ent) { // ent = [GUID, id(?), details] // format for links: { controllingTeam, creator, edge } // format for portals: { controllingTeam, turret } From adc845c2ffef497da798da1369af5f794efb763b Mon Sep 17 00:00:00 2001 From: Stefan Breunig Date: Wed, 6 Mar 2013 06:37:11 +0100 Subject: [PATCH 08/11] fix user guide due to recent patches --- USERGUIDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/USERGUIDE.md b/USERGUIDE.md index d5d6ac59..a4a85a44 100644 --- a/USERGUIDE.md +++ b/USERGUIDE.md @@ -77,7 +77,7 @@ Map Status / Updates It shows if there are operations currently pending. This includes chat updates as well as map data requests. Updates happen every 45s to 90s, depending on how far zoomed in you are. Zoom in closer for faster updates. -It also shows which portals are being loaded/shown. Zoom in to see lower level portals. This is a limit of the server and not IITC. Portals levels that cannot be shown are also striked through in the layer chooser. +It also shows which portals are being loaded/shown. Zoom in to see lower level portals. This is a limit of both the server and IITC. The server will only send low level portals if zoomed in enough. IITC will only show low level portals if there are few enough to not hit the render limit. The render limit is required, otherwise the map would be veryslow. Portals levels that cannot be shown are also striked through in the layer chooser. **Failures:** If a data request failed, it is retried once. Only if the retry fails as well, a “failure” message is shown in the map status. You can either wait for the next automatic update or move the map a little. Also try to zoom in to request less data, which makes it less likely that the servers fail. The failure counter is reset on the next auto update or if you move the map. From 3c6332624b01fb7bd9ea58c7c1a3b6a66ac8c4cf Mon Sep 17 00:00:00 2001 From: Sven Neuhaus Date: Wed, 6 Mar 2013 08:48:52 +0100 Subject: [PATCH 09/11] Update README.md remove bogus return that breaks the link --- plugins/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/README.md b/plugins/README.md index 81b6b942..5cb122e5 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -18,8 +18,7 @@ Available Plugins - [**Render Limit Increase**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/render-limit-increase.user.js) increases render limits. Good for high density areas (e.g. London, UK) and faster PCs. - [**Resonator Display Zoom Level Decrease**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/resonator-display-zoom-level-decrease.user.js) Resonator start displaying earlier. - [**Resonator Energy in Portal Detail**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/reso-energy-pct-in-portal-detail.user.js) Resonator energy in percent is displayed in the portal detals. -- [**Scale Bar**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/scale-bar.user.js) Shows a scale bar in the top left corner. [View screenshot](http://breunigs.github.com/ingress-intel-total-conversion/scre -enshots/plugin_scale_bar.png) +- [**Scale Bar**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/scale-bar.user.js) Shows a scale bar in the top left corner. [View screenshot](http://breunigs.github.com/ingress-intel-total-conversion/screenshots/plugin_scale_bar.png) - [**Show Portal Address**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/show-address.user.js) Shows portal address in the side panel. ### available only with the development version From 1b737c669964609421264052207eb49576087fd7 Mon Sep 17 00:00:00 2001 From: Stefan Breunig Date: Wed, 6 Mar 2013 18:46:24 +0100 Subject: [PATCH 10/11] reduce limit for auto reload --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index cfe5a743..027adb8f 100644 --- a/main.js +++ b/main.js @@ -42,7 +42,7 @@ if(!d) { // page doesn’t have a script tag with player information. if(document.getElementById('header_email')) { // however, we are logged in. - setTimeout('location.reload();', 10*1000); + setTimeout('location.reload();', 3*1000); throw('Page doesn’t have player data, but you are logged in. Reloading in 10s.'); } // FIXME: handle nia takedown in progress From 8115f10e1f4fa3422148301add8884d0604245ba Mon Sep 17 00:00:00 2001 From: vita10gy Date: Wed, 6 Mar 2013 22:25:48 -0600 Subject: [PATCH 11/11] Ignore "Your Link" messages Likely fix for #350 --- plugins/player-tracker.user.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/player-tracker.user.js b/plugins/player-tracker.user.js index fe9c66a8..f75fd4c8 100644 --- a/plugins/player-tracker.user.js +++ b/plugins/player-tracker.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @id iitc-plugin-player-tracker@breunigs // @name iitc: player tracker -// @version 0.6.1 +// @version 0.7 // @namespace https://github.com/breunigs/ingress-intel-total-conversion // @updateURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/player-tracker.user.js // @downloadURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/player-tracker.user.js @@ -80,7 +80,8 @@ window.plugin.playerTracker.processNewData = function(data) { // field was originally created. Therefore it’s not clear which // portal the player is at, so ignore it. if(markup[1].plain.indexOf('destroyed the Link') !== -1 - || markup[1].plain.indexOf('destroyed a Control Field') !== -1) { + || markup[1].plain.indexOf('destroyed a Control Field') !== -1 + || markup[1].plain.indexOf('Your Link') !== -1) { skipThisMessage = true; return false; }