plugin: fix infrastructure problem highlighter
This commit is contained in:
parent
baa8f4bbcc
commit
27fefb22fd
@ -2,7 +2,7 @@
|
|||||||
// @id iitc-plugin-highlight-portal-infrastructure@vita10gy
|
// @id iitc-plugin-highlight-portal-infrastructure@vita10gy
|
||||||
// @name IITC plugin: highlight portals with infrastructure problems
|
// @name IITC plugin: highlight portals with infrastructure problems
|
||||||
// @category Highlighter
|
// @category Highlighter
|
||||||
// @version 0.2.0.@@DATETIMEVERSION@@
|
// @version 0.2.1.@@DATETIMEVERSION@@
|
||||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||||
// @updateURL @@UPDATEURL@@
|
// @updateURL @@UPDATEURL@@
|
||||||
// @downloadURL @@DOWNLOADURL@@
|
// @downloadURL @@DOWNLOADURL@@
|
||||||
@ -31,15 +31,15 @@ window.plugin.portalInfrastructure.badTitles = ['^statue$',
|
|||||||
'no title'];
|
'no title'];
|
||||||
|
|
||||||
window.plugin.portalInfrastructure.highlight = function(data) {
|
window.plugin.portalInfrastructure.highlight = function(data) {
|
||||||
var d = data.portal.options.details;
|
var d = data.portal.options.data;
|
||||||
var color = '';
|
var color = '';
|
||||||
var opa = .75;
|
var opa = .75;
|
||||||
|
|
||||||
if(!(d.imageByUrl && d.imageByUrl.imageUrl)) {
|
if(!(d.image)) {
|
||||||
color = 'red';
|
color = 'red';
|
||||||
}
|
}
|
||||||
|
|
||||||
if((new RegExp(window.plugin.portalInfrastructure.badTitles.join("|"),'i')).test(d.portalV2.descriptiveText.TITLE)) {
|
if((new RegExp(window.plugin.portalInfrastructure.badTitles.join("|"),'i')).test(d.title)) {
|
||||||
color = color == 'red' ? 'orange' : 'yellow';
|
color = color == 'red' ? 'orange' : 'yellow';
|
||||||
opa = .9;
|
opa = .9;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user