aboutsummaryrefslogtreecommitdiffstats
path: root/gmail-commando.js
diff options
context:
space:
mode:
authoranekos2010-05-28 11:43:25 +0000
committeranekos2010-05-28 11:43:25 +0000
commit004684b149597c60e4eee439425f7b93948ee833 (patch)
tree596d94ea54b6228cd15f85ff8c94a63207f7f3f6 /gmail-commando.js
parentf3a534565246c2945f290c63cb184cb337a11a8f (diff)
downloadvimperator-plugins-004684b149597c60e4eee439425f7b93948ee833.tar.bz2
label: 補完をページ外でも
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@37743 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'gmail-commando.js')
-rwxr-xr-xgmail-commando.js11
1 files changed, 8 insertions, 3 deletions
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) {