Portals-list code cleanup, change four to two space line indent
This commit is contained in:
@ -45,7 +45,7 @@ window.plugin.portalslist.resP = 0;
|
||||
window.plugin.portalslist.filter=0;
|
||||
|
||||
//fill the listPortals array with portals avalaible on the map (level filtered portals will not appear in the table)
|
||||
window.plugin.portalslist.getPortals = function(){
|
||||
window.plugin.portalslist.getPortals = function() {
|
||||
//filter : 0 = All, 1 = Res, 2 = Enl
|
||||
//console.log('** getPortals');
|
||||
var retval=false;
|
||||
@ -89,11 +89,12 @@ window.plugin.portalslist.getPortals = function(){
|
||||
//get shield informations
|
||||
var shields = [];
|
||||
$.each(d.portalV2.linkedModArray, function(ind, mod) {
|
||||
if (mod)
|
||||
if (mod) {
|
||||
//shields[ind] = mod.rarity.capitalize().replace('_', ' ');
|
||||
shields[ind] = [mod.rarity.substr(0,1).capitalize(), getPlayerName(mod.installingUser)] ;
|
||||
else
|
||||
} else {
|
||||
shields[ind] = ['', ''];
|
||||
}
|
||||
});
|
||||
|
||||
var APgain= getAttackApGain(d).enemyAp;
|
||||
@ -193,7 +194,7 @@ window.plugin.portalslist.portalTable = function(sortBy, sortOrder, filter) {
|
||||
retVal = b[sortBy] - a[sortBy];
|
||||
break;
|
||||
}
|
||||
if (sortOrder > 0) { retVal = -retVal} //thx @jonatkins
|
||||
if (sortOrder > 0) retVal = -retVal; //thx @jonatkins
|
||||
return retVal;
|
||||
});
|
||||
|
||||
@ -273,7 +274,7 @@ window.plugin.portalslist.stats = function(sortBy) {
|
||||
}
|
||||
|
||||
//return Html generated to export links
|
||||
window.plugin.portalslist.exportLinks = function(){
|
||||
window.plugin.portalslist.exportLinks = function() {
|
||||
var html='';
|
||||
var stamp = new Date().getTime();
|
||||
|
||||
@ -283,7 +284,7 @@ window.plugin.portalslist.exportLinks = function(){
|
||||
return html;
|
||||
}
|
||||
|
||||
window.plugin.portalslist.export = function(fileformat){
|
||||
window.plugin.portalslist.export = function(fileformat) {
|
||||
//alert('format :' + fileformat);
|
||||
var file = '';
|
||||
var uri = '';
|
||||
@ -304,7 +305,7 @@ window.plugin.portalslist.export = function(fileformat){
|
||||
}
|
||||
return uri;
|
||||
}
|
||||
window.plugin.portalslist.exportCSV = function(){
|
||||
window.plugin.portalslist.exportCSV = function() {
|
||||
var csv = '';
|
||||
var filter = window.plugin.portalslist.filter;
|
||||
var portals = window.plugin.portalslist.listPortals;
|
||||
@ -314,7 +315,7 @@ window.plugin.portalslist.exportCSV = function(){
|
||||
|
||||
$.each(portals, function(ind, portal) {
|
||||
|
||||
if (filter === 0 || filter === portal.team){
|
||||
if (filter === 0 || filter === portal.team) {
|
||||
csv += portal.name + '\t'
|
||||
+ portal.level + '\t'
|
||||
+ portal.team + '\t';
|
||||
@ -332,7 +333,7 @@ window.plugin.portalslist.exportCSV = function(){
|
||||
return csv;
|
||||
}
|
||||
|
||||
window.plugin.portalslist.exportKML = function(){
|
||||
window.plugin.portalslist.exportKML = function() {
|
||||
var kml = '';
|
||||
var filter = window.plugin.portalslist.filter;
|
||||
// all portals informations are avalaible in the listPortals array
|
||||
|
Reference in New Issue
Block a user