From e528b42b7528450780482d9eaa8b37a06f68b204 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Thu, 29 Aug 2013 20:30:52 +0100 Subject: [PATCH] remove plugin - it relied on data that niantic no longer send --- plugins/players-portal-pictures.user.js | 99 +------------------------ 1 file changed, 2 insertions(+), 97 deletions(-) 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@@