Skip to content

Instantly share code, notes, and snippets.

@johnd0e
Last active August 24, 2019 12:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnd0e/3dd00a6b828c4f7cdb6931528174469f to your computer and use it in GitHub Desktop.
Save johnd0e/3dd00a6b828c4f7cdb6931528174469f to your computer and use it in GitHub Desktop.
// ==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