// ==UserScript== // @id iitc-plugin-done-links@jonatkins // @name IITC plugin: done links // @category Layer // @version 0.0.1.@@DATETIMEVERSION@@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ // @description [@@BUILDNAME@@-@@BUILDDATE@@] A companion to the Cross Links plugin. Highlights any links that match existing draw-tools line/polygon edges // @include https://*.ingress.com/intel* // @include http://*.ingress.com/intel* // @match https://*.ingress.com/intel* // @match http://*.ingress.com/intel* // @include https://*.ingress.com/mission/* // @include http://*.ingress.com/mission/* // @match https://*.ingress.com/mission/* // @match http://*.ingress.com/mission/* // @grant none // ==/UserScript== @@PLUGINSTART@@ // PLUGIN START //////////////////////////////////////////////////////// window.plugin.doneLinks = function() {}; window.plugin.doneLinks.sameLink = function(a0, a1, b0, b1) { if (a0.equals(b0) && a1.equals(b1)) return true; if (a0.equals(b1) && a1.equals(b0)) return true; return false; } window.plugin.doneLinks.testPolyLine = function (polyline, link,closed) { var a = link.getLatLngs(); var b = polyline.getLatLngs(); for (var i=0;i