From 004684b149597c60e4eee439425f7b93948ee833 Mon Sep 17 00:00:00 2001 From: anekos Date: Fri, 28 May 2010 11:43:25 +0000 Subject: label: 補完をページ外でも git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@37743 d0d07461-0603-4401-acd4-de1884942a52 --- gmail-commando.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'gmail-commando.js') diff --git a/gmail-commando.js b/gmail-commando.js index 3bba5cc..5247d44 100755 --- a/gmail-commando.js +++ b/gmail-commando.js @@ -232,7 +232,9 @@ let INFO = } else { liberator.open(URL + encodeURIComponent(args), liberator.NEW_TAB); } - } + }, + + storage: storage.newMap('gmail-commando', {store: true}) }; const Commands = { @@ -249,10 +251,13 @@ let INFO = __noSuchMethod__: function () void 0, label: function (context) { - context.completions = [ + let completions = [ [label.textContent.replace(/\s*\(\d+\+?\)$/, ''), label.textContent] - for ([, label] in Iterator(Elements.labels)) + for ([, label] in Iterator(Commando.inGmail ? Elements.labels : Commando.storage.get('labels', []))) ]; + if (Commando.inGmail) + Commando.storage.set('labels', Elements.labels); + context.completions = completions; }, is: function (context) { -- cgit v1.2.3