Last active
August 24, 2019 12:16
-
-
Save johnd0e/3dd00a6b828c4f7cdb6931528174469f to your computer and use it in GitHub Desktop.
IITC plugin: Custom geodesic / https://cdn.staticaly.com/gist/johnd0e/3dd00a6b828c4f7cdb6931528174469f/raw/custom-geodesic.user.js?env=dev
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @id custom-geodesic | |
// @name IITC plugin: Custom geodesic | |
// @category Custom | |
// @version 0.1.0 | |
// @description Customize geodesic precision by increasing intermediate points count | |
// @namespace https://github.com/IITC-CE/ingress-intel-total-conversion | |
// @include https://intel.ingress.com/* | |
// @grant none | |
// ==/UserScript== | |
if (typeof window.plugin !== 'function') window.plugin = function() {}; | |
(function wrapper (plugin_info) { | |
function setup () { | |
L.GeodesicCircle.mergeOptions({ // default: | |
segmentsCoeff: 500, // 1000 | |
segmentsMin: 96 // 48 | |
}); | |
var polyOptions = { segmentsCoeff: 500 }; // 5000 | |
L.GeodesicPolyline.mergeOptions(polyOptions); | |
L.GeodesicPolygon.mergeOptions(polyOptions); | |
} | |
setup.priority = 'high'; | |
setup.info = plugin_info; //add the script info data to the function as a property | |
if (!window.bootPlugins) window.bootPlugins = []; | |
window.bootPlugins.push(setup); | |
if (window.iitcLoaded && typeof setup === 'function') setup(); | |
})({ script: typeof GM_info !== 'undefined' && GM_info.script && { | |
version: GM_info.script.version, name: GM_info.script.name, description: GM_info.script.description | |
}})// wrapper end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment