Merge branch 'master' into highlighter
This commit is contained in:
@ -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*
|
||||
|
@ -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('<aside><a href="http://ipas.graphracer.com/index.html#' + window.plugin.ipasLink.getHash(d.portalDetails) + '" target="ipaswindow" title="Use IAPS to simulate an attack on this portal">Simulate attack</a></aside>');
|
||||
}
|
||||
|
||||
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() {
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user