From 02023cb9d56bf0c2347d622ae65006204b6f2ae2 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Mon, 9 Jun 2008 11:57:11 +0000 Subject: [PATCH] [muttator] initial ys and yf mapping, better/more y* commands to come --- content/mail.js | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/content/mail.js b/content/mail.js index f2bc31d0..f112e1f3 100644 --- a/content/mail.js +++ b/content/mail.js @@ -548,14 +548,6 @@ liberator.Mail = function () //{{{ MsgMarkMsgAsRead(); }); - /*liberator.mappings.add(modes, ["tR"], - "Tag thread as read", - function () - { - // TODO: ensure thread or beep - - MsgMarkThreadAsRead(); - });*/ liberator.mappings.add(modes, ["ls"], "Toggle selected messages starred", @@ -593,6 +585,7 @@ liberator.Mail = function () //{{{ }); }); + // DISPLAY OPTIONS liberator.mappings.add(modes, ["h"], "Toggle displayed headers", function () @@ -610,6 +603,31 @@ liberator.Mail = function () //{{{ liberator.mail.setHTML(want_html ? 1 : 0); }); + // YANKING TEXT + liberator.mappings.add(modes, ["ys"], + "Yank subject", + function () + { + try + { + var subject = gDBView.hdrForFirstSelectedMessage.mime2DecodedSubject; + liberator.util.copyToClipboard(subject, true); + } + catch (e) { liberator.beep(); } + }); + + liberator.mappings.add(modes, ["yf"], + "Yank From:", + function () + { + try + { + var author = gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor; + liberator.util.copyToClipboard(author, true); + } + catch (e) { liberator.beep(); } + }); + /////////////////////////////////////////////////////////////////////////////}}} ////////////////////// COMMANDS //////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////{{{