aboutsummaryrefslogtreecommitdiffstats
path: root/gmail-commando.js
diff options
context:
space:
mode:
authoranekos2010-05-28 09:31:47 +0000
committeranekos2010-05-28 09:31:47 +0000
commitd3c1834ee6ee5f3cd5a78ce06bcbc2d2d33debf8 (patch)
tree816e099cc26a1c5a32114129e713255e49d6029b /gmail-commando.js
parentacc484ca4d755f2a5534f016eff371d02e24be59 (diff)
downloadvimperator-plugins-d3c1834ee6ee5f3cd5a78ce06bcbc2d2d33debf8.tar.bz2
翻訳コマンド追加
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@37734 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'gmail-commando.js')
-rwxr-xr-xgmail-commando.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/gmail-commando.js b/gmail-commando.js
index 963c12d..088f6d8 100755
--- a/gmail-commando.js
+++ b/gmail-commando.js
@@ -98,17 +98,31 @@ let INFO =
const Elements = {
get doc() content.frames[3].document,
+
get labels() A(this.doc.querySelectorAll('a.n0')),
+
get input() this.doc.getElementById(':rh'),
+
get searchButton() this.doc.getElementById(':rj'),
+
+ get translateButton () this.mail.querySelector('tr > td.SA > .iL.B9'),
+ get translateButtons () A(this.doc.querySelector('tr > td.SA > .iL.B9')),
+
+ get mail ()
+ A(this.doc.querySelectorAll('.h7')).filter(
+ function (it) !it.querySelector('.hF.hH > img.hG')
+ )[0],
+ get mails () A(this.doc.querySelectorAll('.h7')),
};
+ // Array.slice(content.frames[3].document.querySelectorAll('.hF.hH > .hG'))
+
const Commands = {
+ translate: function () buffer.followLink(Elements.translateButton)
};
const GMailSearchKeyword = 'label intitle'.split(/\s/);
-
commands.addUserCommand(
['gmail'],
'GMail Commando',