From 92e8c5c6a181dbc7788d0327fb972667f6840e03 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Sat, 14 Dec 2013 05:22:29 +0000 Subject: [PATCH] portals list plugin - level colour background on level numbers - abbreviated faction to 3 characters, to save space - increased portal name column width --- plugins/portals-list.user.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/plugins/portals-list.user.js b/plugins/portals-list.user.js index 6b173449..63a149e3 100644 --- a/plugins/portals-list.user.js +++ b/plugins/portals-list.user.js @@ -64,16 +64,14 @@ window.plugin.portalslist.getPortals = function() { retval=true; var d = portal.options.data; - var teamN = window.TEAM_NONE; + var teamN = portal.options.team; - switch (d.team){ - case 'RESISTANCE' : + switch (teamN){ + case TEAM_RES: window.plugin.portalslist.resP++; - teamN = window.TEAM_RES break; - case 'ENLIGHTENED' : + case TEAM_ENL: window.plugin.portalslist.enlP++; - teamN = window.TEAM_ENL; break; } var l = window.getPortalLinks(i); @@ -155,17 +153,17 @@ window.plugin.portalslist.portalTable = function(sortBy, sortOrder, filter) { + 'Level' + 'Team' + 'Health' - + 'Resonator Count' - + 'Link Count' - + 'Field Count' + + 'Resonators' + + 'Links' + + 'Fields' $.each(portals, function(ind, portal) { if (filter === TEAM_NONE || filter === portal.teamN) { html += '' + '' + window.plugin.portalslist.getPortalLink(portal, portal.guid) + '' - + '' + portal.level + '' - + '' + portal.team + ''; + + '' + portal.level + '' + + '' + portal.team.substr(0,3) + ''; html += '' + portal.health + '' + '' + portal.resCount + '' @@ -260,7 +258,7 @@ var setup = function() { '#portalslist .filterRes { margin-top: 10px; background-color: #005684 }' + '#portalslist .filterEnl { margin-top: 10px; background-color: #017f01 }' + '#portalslist .disclaimer { margin-top: 10px; font-size:10px; }' + - '#portalslist .portalTitle { display: inline-block; width: 160px !important; min-width: 160px !important; max-width: 160px !important; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }' + + '#portalslist .portalTitle { display: inline-block; width: 240px !important; min-width: 240px !important; max-width: 160px !important; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }' + ''); // Setup sorting $(document).on('click.portalslist', '#portalslist table th', function() {