Merge branch 'master' of github.com:jonatkins/ingress-intel-total-conversion
This commit is contained in:
commit
1dee77bef9
BIN
assets/prefer-iitc.psd
Normal file
BIN
assets/prefer-iitc.psd
Normal file
Binary file not shown.
28
external/L.Geodesic.js
vendored
28
external/L.Geodesic.js
vendored
@ -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
|
// 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
|
// (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)
|
// rounding errors? maths bug? not sure - but it solves the issue! and is a slight optimisation)
|
||||||
for (i = 1; i < segments; i++) {
|
// UPDATE: there still seem to be rounding errors on relatively short links - but only on mobile.
|
||||||
// http://williams.best.vwh.net/avform.htm#Intermediate
|
// let's only add intermediate points if there's two or more
|
||||||
// modified to handle longitude above +-180 degrees
|
if (segments >= 3) {
|
||||||
f = i / segments;
|
for (i = 1; i < segments; i++) {
|
||||||
A = Math.sin((1-f)*d) / Math.sin(d);
|
// http://williams.best.vwh.net/avform.htm#Intermediate
|
||||||
B = Math.sin(f*d) / Math.sin(d);
|
// modified to handle longitude above +-180 degrees
|
||||||
x = A * Math.cos(lat1) * Math.cos(0) + B * Math.cos(lat2) * Math.cos(dLng);
|
f = i / segments;
|
||||||
y = A * Math.cos(lat1) * Math.sin(0) + B * Math.cos(lat2) * Math.sin(dLng);
|
A = Math.sin((1-f)*d) / Math.sin(d);
|
||||||
z = A * Math.sin(lat1) + B * Math.sin(lat2);
|
B = Math.sin(f*d) / Math.sin(d);
|
||||||
fLat = r2d * Math.atan2(z, Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)));
|
x = A * Math.cos(lat1) * Math.cos(0) + B * Math.cos(lat2) * Math.cos(dLng);
|
||||||
fLng = r2d * (Math.atan2(y, x)+lng1);
|
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
|
// push the final point unmodified
|
||||||
convertedPoints.push(L.latLng(endLatlng));
|
convertedPoints.push(L.latLng(endLatlng));
|
||||||
|
26
plugins/iitc-ditigal-bumper-sticker.user.js
Normal file
26
plugins/iitc-ditigal-bumper-sticker.user.js
Normal file
@ -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);
|
@ -64,16 +64,14 @@ window.plugin.portalslist.getPortals = function() {
|
|||||||
|
|
||||||
retval=true;
|
retval=true;
|
||||||
var d = portal.options.data;
|
var d = portal.options.data;
|
||||||
var teamN = window.TEAM_NONE;
|
var teamN = portal.options.team;
|
||||||
|
|
||||||
switch (d.team){
|
switch (teamN){
|
||||||
case 'RESISTANCE' :
|
case TEAM_RES:
|
||||||
window.plugin.portalslist.resP++;
|
window.plugin.portalslist.resP++;
|
||||||
teamN = window.TEAM_RES
|
|
||||||
break;
|
break;
|
||||||
case 'ENLIGHTENED' :
|
case TEAM_ENL:
|
||||||
window.plugin.portalslist.enlP++;
|
window.plugin.portalslist.enlP++;
|
||||||
teamN = window.TEAM_ENL;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
var l = window.getPortalLinks(i);
|
var l = window.getPortalLinks(i);
|
||||||
@ -155,17 +153,17 @@ window.plugin.portalslist.portalTable = function(sortBy, sortOrder, filter) {
|
|||||||
+ '<th ' + sort('level', sortBy, -1) + '>Level</th>'
|
+ '<th ' + sort('level', sortBy, -1) + '>Level</th>'
|
||||||
+ '<th title="Team" ' + sort('teamN', sortBy, -1) + '>Team</th>'
|
+ '<th title="Team" ' + sort('teamN', sortBy, -1) + '>Team</th>'
|
||||||
+ '<th ' + sort('health', sortBy, -1) + '>Health</th>'
|
+ '<th ' + sort('health', sortBy, -1) + '>Health</th>'
|
||||||
+ '<th ' + sort('resCount', sortBy, -1) + '>Resonator Count</th>'
|
+ '<th ' + sort('resCount', sortBy, -1) + '>Resonators</th>'
|
||||||
+ '<th ' + sort('linkCount', sortBy, -1) + '>Link Count</th>'
|
+ '<th ' + sort('linkCount', sortBy, -1) + '>Links</th>'
|
||||||
+ '<th ' + sort('fieldCount', sortBy, -1) + '>Field Count</th>'
|
+ '<th ' + sort('fieldCount', sortBy, -1) + '>Fields</th>'
|
||||||
|
|
||||||
|
|
||||||
$.each(portals, function(ind, portal) {
|
$.each(portals, function(ind, portal) {
|
||||||
if (filter === TEAM_NONE || filter === portal.teamN) {
|
if (filter === TEAM_NONE || filter === portal.teamN) {
|
||||||
html += '<tr class="' + (portal.teamN === window.TEAM_RES ? 'res' : (portal.teamN === window.TEAM_ENL ? 'enl' : 'neutral')) + '">'
|
html += '<tr class="' + (portal.teamN === window.TEAM_RES ? 'res' : (portal.teamN === window.TEAM_ENL ? 'enl' : 'neutral')) + '">'
|
||||||
+ '<td style="">' + window.plugin.portalslist.getPortalLink(portal, portal.guid) + '</td>'
|
+ '<td style="">' + window.plugin.portalslist.getPortalLink(portal, portal.guid) + '</td>'
|
||||||
+ '<td class="L' + Math.floor(portal.level) +'">' + portal.level + '</td>'
|
+ '<td class="L' + portal.level +'" style="background-color: '+COLORS_LVL[portal.level]+'">' + portal.level + '</td>'
|
||||||
+ '<td style="text-align:center;">' + portal.team + '</td>';
|
+ '<td style="text-align:center;">' + portal.team.substr(0,3) + '</td>';
|
||||||
|
|
||||||
html += '<td style="cursor:help" title="'+ portal.health +'">' + portal.health + '</td>'
|
html += '<td style="cursor:help" title="'+ portal.health +'">' + portal.health + '</td>'
|
||||||
+ '<td>' + portal.resCount + '</td>'
|
+ '<td>' + portal.resCount + '</td>'
|
||||||
@ -260,7 +258,7 @@ var setup = function() {
|
|||||||
'#portalslist .filterRes { margin-top: 10px; background-color: #005684 }' +
|
'#portalslist .filterRes { margin-top: 10px; background-color: #005684 }' +
|
||||||
'#portalslist .filterEnl { margin-top: 10px; background-color: #017f01 }' +
|
'#portalslist .filterEnl { margin-top: 10px; background-color: #017f01 }' +
|
||||||
'#portalslist .disclaimer { margin-top: 10px; font-size:10px; }' +
|
'#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; }' +
|
||||||
'</style>');
|
'</style>');
|
||||||
// Setup sorting
|
// Setup sorting
|
||||||
$(document).on('click.portalslist', '#portalslist table th', function() {
|
$(document).on('click.portalslist', '#portalslist table th', function() {
|
||||||
|
BIN
website/assets/img/prefer-iitc-200.png
Normal file
BIN
website/assets/img/prefer-iitc-200.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
BIN
website/assets/img/prefer-iitc-205.png
Normal file
BIN
website/assets/img/prefer-iitc-205.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
BIN
website/assets/img/prefer-iitc-256.png
Normal file
BIN
website/assets/img/prefer-iitc-256.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
BIN
website/assets/img/prefer-iitc-512.png
Normal file
BIN
website/assets/img/prefer-iitc-512.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 63 KiB |
Loading…
x
Reference in New Issue
Block a user