parent
02cb4fbe8f
commit
4caea29fd3
@ -17,7 +17,9 @@ window.getRangeText = function(d) {
|
|||||||
window.getPortalDescriptionFromDetails = function(details) {
|
window.getPortalDescriptionFromDetails = function(details) {
|
||||||
var descObj = details.portalV2.descriptiveText;
|
var descObj = details.portalV2.descriptiveText;
|
||||||
// FIXME: also get real description?
|
// FIXME: also get real description?
|
||||||
var desc = descObj.TITLE + '\n' + descObj.ADDRESS;
|
var desc = descObj.TITLE;
|
||||||
|
if(descObj.ADDRESS)
|
||||||
|
desc += '\n' + descObj.ADDRESS;
|
||||||
if(descObj.ATTRIBUTION)
|
if(descObj.ATTRIBUTION)
|
||||||
desc += '\nby '+descObj.ATTRIBUTION+' ('+descObj.ATTRIBUTION_LINK+')';
|
desc += '\nby '+descObj.ATTRIBUTION+' ('+descObj.ATTRIBUTION_LINK+')';
|
||||||
return desc;
|
return desc;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// @id iitc-plugin-show-address@vita10gy
|
// @id iitc-plugin-show-address@vita10gy
|
||||||
// @name IITC plugin: show portal address in sidebar
|
// @name IITC plugin: show portal address in sidebar
|
||||||
// @category Portal Info
|
// @category Portal Info
|
||||||
// @version 0.2.2.@@DATETIMEVERSION@@
|
// @version 0.2.3.@@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@@
|
||||||
@ -26,8 +26,12 @@ window.plugin.portalAddress.portalDetail = function(data) {
|
|||||||
// country, so get rid of it. If the country is in the [2] then it
|
// country, so get rid of it. If the country is in the [2] then it
|
||||||
// doesn't matter because address is usually short enough to fit.
|
// doesn't matter because address is usually short enough to fit.
|
||||||
var d = data.portalDetails.portalV2;
|
var d = data.portalDetails.portalV2;
|
||||||
var address = d.descriptiveText.ADDRESS.split(',').splice(0,3).join(',');
|
var address = d.descriptiveText.ADDRESS;
|
||||||
$('.imgpreview').append('<div id="address">'+address+'</div>');
|
if (address) {
|
||||||
|
address = address.split(',').splice(0,3).join(',');
|
||||||
|
$('.imgpreview').append('<div id="address">'+address+'</div>');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var setup = function() {
|
var setup = function() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user