diff --git a/assets/prefer-iitc.psd b/assets/prefer-iitc.psd new file mode 100644 index 00000000..bf0e1424 Binary files /dev/null and b/assets/prefer-iitc.psd differ diff --git a/external/L.Geodesic.js b/external/L.Geodesic.js index 8a6ef59e..6313db95 100644 --- a/external/L.Geodesic.js +++ b/external/L.Geodesic.js @@ -58,19 +58,23 @@ Modified by qnstie 2013-07-17 to maintain compatibility with Leaflet.draw // loop ends before 'segments' is reached - we don't add the very last point here but outside the loop // (this was to fix a bug - https://github.com/jonatkins/ingress-intel-total-conversion/issues/471 // rounding errors? maths bug? not sure - but it solves the issue! and is a slight optimisation) - for (i = 1; i < segments; i++) { - // http://williams.best.vwh.net/avform.htm#Intermediate - // modified to handle longitude above +-180 degrees - f = i / segments; - A = Math.sin((1-f)*d) / Math.sin(d); - B = Math.sin(f*d) / Math.sin(d); - x = A * Math.cos(lat1) * Math.cos(0) + B * Math.cos(lat2) * Math.cos(dLng); - y = A * Math.cos(lat1) * Math.sin(0) + B * Math.cos(lat2) * Math.sin(dLng); - z = A * Math.sin(lat1) + B * Math.sin(lat2); - fLat = r2d * Math.atan2(z, Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))); - fLng = r2d * (Math.atan2(y, x)+lng1); + // UPDATE: there still seem to be rounding errors on relatively short links - but only on mobile. + // let's only add intermediate points if there's two or more + if (segments >= 3) { + for (i = 1; i < segments; i++) { + // http://williams.best.vwh.net/avform.htm#Intermediate + // modified to handle longitude above +-180 degrees + f = i / segments; + A = Math.sin((1-f)*d) / Math.sin(d); + B = Math.sin(f*d) / Math.sin(d); + x = A * Math.cos(lat1) * Math.cos(0) + B * Math.cos(lat2) * Math.cos(dLng); + y = A * Math.cos(lat1) * Math.sin(0) + B * Math.cos(lat2) * Math.sin(dLng); + z = A * Math.sin(lat1) + B * Math.sin(lat2); + fLat = r2d * Math.atan2(z, Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))); + fLng = r2d * (Math.atan2(y, x)+lng1); - convertedPoints.push(L.latLng([fLat, fLng])); + convertedPoints.push(L.latLng([fLat, fLng])); + } } // push the final point unmodified convertedPoints.push(L.latLng(endLatlng)); diff --git a/plugins/iitc-ditigal-bumper-sticker.user.js b/plugins/iitc-ditigal-bumper-sticker.user.js new file mode 100644 index 00000000..d2ceb91d --- /dev/null +++ b/plugins/iitc-ditigal-bumper-sticker.user.js @@ -0,0 +1,26 @@ +// ==UserScript== +// @id iitc-digital-bumper-sticker +// @name IITC Digital Bumper Sticker +// @category Stock +// @version 0.1.0.@@DATETIMEVERSION@@ +// @namespace https://github.com/jonatkins/ingress-intel-total-conversion +// @updateURL @@UPDATEURL@@ +// @downloadURL @@DOWNLOADURL@@ +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Adds a "I'd rather be using IITC" logo to the standard intel map. +// @include https://www.ingress.com/intel* +// @include http://www.ingress.com/intel* +// @match https://www.ingress.com/intel* +// @match http://www.ingress.com/intel* +// @grant none +// ==/UserScript== + +var logoDiv = document.createElement('div'); +logoDiv.setAttribute('style', "position: fixed; left: 20px; top: 130px; z-index: auto; pointer-events: none;"); + +var img = document.createElement('img'); +img.setAttribute('src', 'http://iitc.jonatkins.com/assets/img/prefer-iitc-200.png'); + +logoDiv.appendChild(img); + +var targetContainer = document.getElementById('dashboard_container'); +targetContainer.appendChild(logoDiv); diff --git a/plugins/portals-list.user.js b/plugins/portals-list.user.js index 6b173449..63a149e3 100644 --- a/plugins/portals-list.user.js +++ b/plugins/portals-list.user.js @@ -64,16 +64,14 @@ window.plugin.portalslist.getPortals = function() { retval=true; var d = portal.options.data; - var teamN = window.TEAM_NONE; + var teamN = portal.options.team; - switch (d.team){ - case 'RESISTANCE' : + switch (teamN){ + case TEAM_RES: window.plugin.portalslist.resP++; - teamN = window.TEAM_RES break; - case 'ENLIGHTENED' : + case TEAM_ENL: window.plugin.portalslist.enlP++; - teamN = window.TEAM_ENL; break; } var l = window.getPortalLinks(i); @@ -155,17 +153,17 @@ window.plugin.portalslist.portalTable = function(sortBy, sortOrder, filter) { + 'Level' + 'Team' + 'Health' - + 'Resonator Count' - + 'Link Count' - + 'Field Count' + + 'Resonators' + + 'Links' + + 'Fields' $.each(portals, function(ind, portal) { if (filter === TEAM_NONE || filter === portal.teamN) { html += '' + '' + window.plugin.portalslist.getPortalLink(portal, portal.guid) + '' - + '' + portal.level + '' - + '' + portal.team + ''; + + '' + portal.level + '' + + '' + portal.team.substr(0,3) + ''; html += '' + portal.health + '' + '' + portal.resCount + '' @@ -260,7 +258,7 @@ var setup = function() { '#portalslist .filterRes { margin-top: 10px; background-color: #005684 }' + '#portalslist .filterEnl { margin-top: 10px; background-color: #017f01 }' + '#portalslist .disclaimer { margin-top: 10px; font-size:10px; }' + - '#portalslist .portalTitle { display: inline-block; width: 160px !important; min-width: 160px !important; max-width: 160px !important; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }' + + '#portalslist .portalTitle { display: inline-block; width: 240px !important; min-width: 240px !important; max-width: 160px !important; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }' + ''); // Setup sorting $(document).on('click.portalslist', '#portalslist table th', function() { diff --git a/website/assets/img/prefer-iitc-200.png b/website/assets/img/prefer-iitc-200.png new file mode 100644 index 00000000..3732c76f Binary files /dev/null and b/website/assets/img/prefer-iitc-200.png differ diff --git a/website/assets/img/prefer-iitc-205.png b/website/assets/img/prefer-iitc-205.png new file mode 100644 index 00000000..657ccb77 Binary files /dev/null and b/website/assets/img/prefer-iitc-205.png differ diff --git a/website/assets/img/prefer-iitc-256.png b/website/assets/img/prefer-iitc-256.png new file mode 100644 index 00000000..21b36023 Binary files /dev/null and b/website/assets/img/prefer-iitc-256.png differ diff --git a/website/assets/img/prefer-iitc-512.png b/website/assets/img/prefer-iitc-512.png new file mode 100644 index 00000000..5c6dc047 Binary files /dev/null and b/website/assets/img/prefer-iitc-512.png differ