Skip to content

Instantly share code, notes, and snippets.

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 ryantheleach/a49339b9321ff65854379f969269cffc to your computer and use it in GitHub Desktop.
Save ryantheleach/a49339b9321ff65854379f969269cffc to your computer and use it in GitHub Desktop.
// ==UserScript==
// @id iitc-plugin-basemap-gmaps-giantseyes@marcg
// @name IITC plugin: GiantsEyes Google Roads
// @category Map Tiles
// @version 0.1.0.0
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @description Port of iitc RecognEyes Theme
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @include https://intel.ingress.com/*
// @match https://intel.ingress.com/*
// @include https://www.ingress.com/mission/*
// @include http://www.ingress.com/mission/*
// @match https://www.ingress.com/mission/*
// @match http://www.ingress.com/mission/*
// @grant none
// ==/UserScript==
function wrapper(plugin_info) {
// ensure plugin framework is there, even if iitc is not yet loaded
if(typeof window.plugin !== 'function') window.plugin = function() {};
// PLUGIN START ////////////////////////////////////////////////////////
// use own namespace for plugin
window.plugin.reGMaps = function() {};
window.plugin.reGMaps.addLayer = function() {
var reGMapsOptions = {
type: 'roadmap',
maxZoom: 21,
backgroundColor: '#0e3d4e', //or #dddddd ? - that's the Google tile layer default
styles: [
{
"featureType": "landscape",
"stylers": [
{ "color": "#101020" }
]
},{
"featureType": "poi",
"stylers": [
{ "visibility": "off" }
]
},{
"featureType": "road.local",
"elementType": "labels",
"stylers": [
{ "visibility": "off" }
]
},{
"elementType": "labels.icon",
"stylers": [
{ "visibility": "off" }
]
},{
"featureType": "administrative.land_parcel",
"stylers": [
{ "visibility": "off" }
]
},{
"featureType": "road.highway",
"elementType": "geometry.fill",
"stylers": [
{ "color": "#fe8d63" }
]
},{
"featureType": "road.highway",
"elementType": "geometry.stroke",
"stylers": [
{ "color": "#006080" }
]
},{
"featureType": "road.arterial",
"elementType": "geometry",
"stylers": [
{ "visibility": "simplified" },
{ "color": "#ff9966" },
{ "lightness": -44 }
]
},{
"featureType": "road.local",
"stylers": [
{ "weight": 0.2 },
{ "color": "#202030" },
{ "lightness": 44 }
]
},{
"featureType": "water",
"stylers": [
{ "color": "#66aacc" }
]
},{
"elementType": "labels.text",
"stylers": [
{ "visibility": "simplified" },
{ "color": "#0000FF" },
{ "lightness": 48 },
{ "saturation": 85 },
{ "gamma": 1.87 }
]
},{
"featureType": "road.local",
"elementType": "labels",
"stylers": [
{ "visibility": "off" }
]
},{
"featureType": "transit",
"stylers": [
{ "visibility": "off" }
]
}
]
};
var reGMaps = new L.gridLayer.googleMutant(reGMapsOptions);
layerChooser.addBaseLayer(reGMaps, "GiantsEyes");
};
var setup = window.plugin.reGMaps.addLayer;
// PLUGIN END //////////////////////////////////////////////////////////
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 IITC has already booted, immediately run the 'setup' function
if(window.iitcLoaded && typeof setup === 'function') setup();
} // wrapper end
// inject code into site context
var script = document.createElement('script');
var info = {};
if (typeof GM_info !== 'undefined' && GM_info && GM_info.script) info.script = { version: GM_info.script.version, name: GM_info.script.name, description: GM_info.script.description };
script.appendChild(document.createTextNode('('+ wrapper +')('+JSON.stringify(info)+');'));
(document.body || document.head || document.documentElement).appendChild(script);
@ryantheleach
Copy link
Author

Updated to see what it looks like, I don't like it but reshared.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment