Hint: to change a lot of scripts, execute this: sed -r '/\/\/ @match\s+http:\/\/www.ingress.com\/intel/r /tmp/includefile' -i~ *.user.js `/tmp/includefile` should contain these lines: (no trailing newline!) // @include https://www.ingress.com/mission/* // @include http://www.ingress.com/mission/* // @match https://www.ingress.com/mission/* // @match http://www.ingress.com/mission/*
41 lines
1.6 KiB
JavaScript
41 lines
1.6 KiB
JavaScript
// ==UserScript==
|
|
// @id iitc-plugin-highlight-portals-level-color@vita10gy
|
|
// @name IITC plugin: highlight portals by level color
|
|
// @category Highlighter
|
|
// @version 0.1.2.@@DATETIMEVERSION@@
|
|
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
|
// @updateURL @@UPDATEURL@@
|
|
// @downloadURL @@DOWNLOADURL@@
|
|
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Use the portal fill color to denote the portal level by using the game level colors.
|
|
// @include https://www.ingress.com/intel*
|
|
// @include http://www.ingress.com/intel*
|
|
// @match https://www.ingress.com/intel*
|
|
// @match http://www.ingress.com/intel*
|
|
// @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==
|
|
|
|
@@PLUGINSTART@@
|
|
|
|
// PLUGIN START ////////////////////////////////////////////////////////
|
|
|
|
// use own namespace for plugin
|
|
window.plugin.portalHighlighterPortalsLevelColor = function() {};
|
|
|
|
window.plugin.portalHighlighterPortalsLevelColor.colorLevel = function(data) {
|
|
var portal_level = data.portal.options.data.level;
|
|
var opacity = .6;
|
|
data.portal.setStyle({fillColor: COLORS_LVL[portal_level], fillOpacity: opacity});
|
|
}
|
|
|
|
var setup = function() {
|
|
window.addPortalHighlighter('Level Color', window.plugin.portalHighlighterPortalsLevelColor.colorLevel);
|
|
}
|
|
|
|
// PLUGIN END //////////////////////////////////////////////////////////
|
|
|
|
@@PLUGINEND@@
|