diff --git a/plugins/keys.css b/plugins/keys.css index b2aff3ef..f2575f8d 100644 --- a/plugins/keys.css +++ b/plugins/keys.css @@ -64,3 +64,19 @@ margin: 6px 3px 1px 20px !important; cursor: help; } + +.portal-list-keys button { + font-family: monospace; + font-size: 0.9em; + text-align: center; + vertical-align: middle; + min-width: 0; + padding: 0; + width: 1.5em; + margin: -0.5em 0; +} +.portal-list-keys .plus { + margin-left: 0.3em; + margin-right: -1px; +} + diff --git a/plugins/keys.user.js b/plugins/keys.user.js index 70575748..7bea9400 100644 --- a/plugins/keys.user.js +++ b/plugins/keys.user.js @@ -2,7 +2,7 @@ // @id iitc-plugin-keys@xelio // @name IITC plugin: Keys // @category Keys -// @version 0.2.0.@@DATETIMEVERSION@@ +// @version 0.3.0.@@DATETIMEVERSION@@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ @@ -55,8 +55,9 @@ window.plugin.keys.updateDisplayCount = function() { $('#keys-count').html(count); } -window.plugin.keys.addKey = function(addCount) { - var guid = window.selectedPortal; +window.plugin.keys.addKey = function(addCount, guid) { + if(guid == undefined) guid = window.selectedPortal; + var oldCount = plugin.keys.keys[guid]; var newCount = Math.max((oldCount || 0) + addCount, 0); if(oldCount !== newCount) { @@ -169,7 +170,7 @@ window.plugin.keys.setupCSS = function() { $("