diff options
author | anekos | 2010-06-21 16:28:14 +0000 |
---|---|---|
committer | anekos | 2010-06-21 16:28:14 +0000 |
commit | 55261cd431d7ec96e8cd76e49e47539f9a4b355c (patch) | |
tree | 3311c1fe3189a6a187f3b44ec48e2f2f725be965 /gmail-commando.js | |
parent | 8b66fec79c28926404f2e7ec6864c36847949b51 (diff) | |
download | vimperator-plugins-55261cd431d7ec96e8cd76e49e47539f9a4b355c.tar.bz2 |
オプション値 u を追加
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@37851 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'gmail-commando.js')
-rwxr-xr-x | gmail-commando.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gmail-commando.js b/gmail-commando.js index 8c457d0..5343bde 100755 --- a/gmail-commando.js +++ b/gmail-commando.js @@ -272,8 +272,31 @@ let INFO = // XXX 毎度 ID が変わるっぽいので、u から選択 get foldButton () this.threadButtons[3], get unfoldButton () this.threadButtons[2], + + get labelButtons () { + function labels () + Elements.doc.querySelectorAll('.J-LC-Jz'); + function show () + Elements.doc.getElementById(':ps'); + + let result = labels(); + if (result) + return A(result); + + buffer.followLink(show()); + result = labels(); + buffer.followLink(show()); + + return A(result); + } }; + //'.J-M-JJ > input' + //let (e = Elements.doc.querySelector('.J-LC-Jz')) { + // liberator.log(e); + // buffer.followLink(e); + // //plugins.feedSomeKeys_3.API.feed('<Cr>', ['keydown'], e) + //} const Commando = { get inGmail () { @@ -305,6 +328,13 @@ let INFO = translateThread: function () buffer.followLink(Elements.translateThreadButton), fold: function () buffer.followLink(Elements.foldButton), unfold: function () buffer.followLink(Elements.unfoldButton), + label: function (names) { + Elements.labelButtons.forEach(function (e) { + if (names.some(function (v) (v == e.textContent))) + buffer.followLink(e); + liberator.log('pressed: ' + e.textContent); + }); + } }; |