diff --git a/plugins/players-portal-pictures.user.js b/plugins/players-portal-pictures.user.js index ffb6d414..55cac29d 100644 --- a/plugins/players-portal-pictures.user.js +++ b/plugins/players-portal-pictures.user.js @@ -2,10 +2,11 @@ // @id iitc-plugin-players-portal-pictures // @name IITC plugin: Player's Portal Pictures // @version 0.1.0.@@DATETIMEVERSION@@ +// @category Deleted // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] This plugin finds portal pictures submitted by a given player. The input is in the sidebar. +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Niantic removed the data this plugin needed. It is no longer possible to search for photo submitter. // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* @@ -13,99 +14,3 @@ // @grant none // ==/UserScript== -@@PLUGINSTART@@ - -// PLUGIN START //////////////////////////////////////////////////////// - -/********************************************************************************************************* -* Changelog: -* -* 0.1.0 First public release, supports only cover photos for now. -*********************************************************************************************************/ - -// use own namespace for plugin -window.plugin.playersPortalPictures = function() {}; - -window.plugin.playersPortalPictures.findPictures = function(playername) { - var s = ''; - var portalSet = {}; - var effectiveNick = ''; - var team = ''; - var portalCounter = 0; - var pictureCounter = 0; - var totalVoteCounter = 0; - // Assuming there can be no agents with same nick with different lower/uppercase - var nickToFind = playername.toLowerCase(); - $.each(window.portals, function(ind, portal){ - var coverPhotoAttribution = ''; - var attributionMarkup = new Object(); - if(portal.options.details.photoStreamInfo.hasOwnProperty('coverPhoto') && portal.options.details.photoStreamInfo.coverPhoto.hasOwnProperty('attributionMarkup')) { - attributionMarkup = portal.options.details.photoStreamInfo.coverPhoto.attributionMarkup; - if(attributionMarkup.length === 2 && attributionMarkup[0] === 'PLAYER') { - coverPhotoAttribution = attributionMarkup[1].plain; - } else { - return true; - } - } else { - return true; - } - - if(coverPhotoAttribution.toLowerCase() === nickToFind) { - pictureCounter += 1; - if(!effectiveNick) { - effectiveNick = coverPhotoAttribution; - } - if(!team) { - team = attributionMarkup[1].team; - } - var votes = 0; - votes = portal.options.details.photoStreamInfo.coverPhoto.voteCount; - totalVoteCounter += votes; - if(!portalSet.hasOwnProperty(portal.options.guid)) { - portalSet[portal.options.guid] = true; - var latlng = [portal.options.details.locationE6.latE6/1E6, portal.options.details.locationE6.lngE6/1E6].join(); - var guid = portal.options.guid; - var zoomPortal = 'window.zoomToAndShowPortal(\''+guid+'\', ['+latlng+']);return false'; - var perma = '/intel?latE6='+portal.options.details.locationE6.latE6+'&lngE6='+portal.options.details.locationE6.lngE6+'&z=17&pguid='+guid; - var a = $('',{ - 'class': 'help', - text: portal.options.details.portalV2.descriptiveText.TITLE, - title: portal.options.details.portalV2.descriptiveText.ADDRESS, - href: perma, - onClick: zoomPortal - })[0].outerHTML; - portalCounter += 1; - s += a + ': '; - } - s += votes + ' votes
'; - } - }); - if (s) { - // Showing the playername as a "fake" link to avoid the auto-mouseover effect on the first portal - fakeLinkPlayer = '
' + effectiveNick + ''; - s = fakeLinkPlayer + ' has pictures on ' + portalCounter + ' portals with ' + totalVoteCounter + ' total votes:

' + s; - } else { - s = playername + ' has no portal pictures in this range
'; - } - window.dialog({ - title: playername + '\'s portal pictures', - html: s, - id: 'playerPortalPictures', - width: 500 - }); -} - -var setup = function() { - var content = ''; - $('#sidebar').append(content); - $('#toolbox').append(' Player\'s Portal Pictures'); - $('#playerPortalPicture').keypress(function(e) { - if((e.keyCode ? e.keyCode : e.which) !== 13) return; - var data = $(this).val(); - window.plugin.playersPortalPictures.findPictures(data); - }); -} - -// PLUGIN END ////////////////////////////////////////////////////////// - -@@PLUGINEND@@ diff --git a/plugins/portal-highlighter-infrastructure.user.js b/plugins/portal-highlighter-infrastructure.user.js index 50d9b98f..2b102244 100644 --- a/plugins/portal-highlighter-infrastructure.user.js +++ b/plugins/portal-highlighter-infrastructure.user.js @@ -2,11 +2,11 @@ // @id iitc-plugin-highlight-portal-infrastructure@vita10gy // @name IITC plugin: highlight portals with infrastructure problems // @category Highlighter -// @version 0.1.0.@@DATETIMEVERSION@@ +// @version 0.2.0.@@DATETIMEVERSION@@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ -// @description [@@BUILDNAME@@-@@BUILDDATE@@] Red - No Picture, Orange - More than one picture (probably means the original was bad, upvote new), Yellow - Potential title issue +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Red - No Picture, Yellow - Potential title issue, Orange - both of these // @include https://www.ingress.com/intel* // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* @@ -32,15 +32,13 @@ window.plugin.portalInfrastructure.highlight = function(data) { var d = data.portal.options.details; var color = ''; var opa = .75; - - if(d.photoStreamInfo.photoCount === 0) { + + if(!(d.imageByUrl && d.imageByUrl.imageUrl)) { color = 'red'; } - else if(d.photoStreamInfo.photoCount > 1) { - color = 'orange'; - } - else if((new RegExp(window.plugin.portalInfrastructure.badTitles.join("|"),'i')).test(d.portalV2.descriptiveText.TITLE)) { - color = 'yellow'; + + if((new RegExp(window.plugin.portalInfrastructure.badTitles.join("|"),'i')).test(d.portalV2.descriptiveText.TITLE)) { + color = color == 'red' ? 'orange' : 'yellow'; opa = .9; }