create function to get portal image URL from details - and perform any necessary default URL replacement and https conversion

This commit is contained in:
Jon Atkins
2013-08-27 18:16:02 +01:00
parent 563258a897
commit 81d0cb0ed8
4 changed files with 22 additions and 7 deletions

View File

@ -2,7 +2,7 @@
// @id iitc-plugin-show-linked-portals@fstopienski
// @name IITC plugin: Show linked portals
// @category Portal Info
// @version 0.0.7.@@DATETIMEVERSION@@
// @version 0.0.8.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
@ -78,7 +78,7 @@ window.plugin.showLinkedPortal.getPortalByGuid = function (guid) {
.append($('<br/>'))
.append($('<em/>').text('(' + portalDetails.portalV2.descriptiveText.ADDRESS + ')'))
.html();
var imageUrl = (portalDetails.imageByUrl ? portalDetails.imageByUrl.imageUrl : window.DEFAULT_PORTAL_IMG);
var imageUrl = getPortalImageUrl(portalDetails);
portalInfoString = $('<div/>').html($('<img/>').attr('src', imageUrl)
.attr('class', 'minImg')
.attr('alt', portalNameAdressAlt)