diff --git a/content/mail.js b/content/mail.js index 232cdfc8..9fcc32ce 100644 --- a/content/mail.js +++ b/content/mail.js @@ -103,6 +103,11 @@ liberator.Mail = function () //{{{ return [0, liberator.completion.filter(completions, filter)]; } + function getRSSUrl() + { + return gDBView.hdrForFirstSelectedMessage.messageId.replace(/(#.*)?@.*$/, ""); + } + function moveOrCopy(copy, destinationFolder, operateOnThread) { if (!destinationFolder) @@ -612,7 +617,7 @@ liberator.Mail = function () //{{{ }); // YANKING TEXT - liberator.mappings.add(modes, ["ys"], + liberator.mappings.add(modes, ["Y"], "Yank subject", function () { @@ -624,14 +629,30 @@ liberator.Mail = function () //{{{ catch (e) { liberator.beep(); } }); - liberator.mappings.add(modes, ["yf"], - "Yank From:", + liberator.mappings.add(modes, ["y"], + "Yank sender or feed URL", function () { try { - var author = gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor; - liberator.util.copyToClipboard(author, true); + if (liberator.mail.currentAccount.server.type == "rss") + liberator.util.copyToClipboard(getRSSUrl(), true); + else + liberator.util.copyToClipboard(gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor, true); + } + catch (e) { liberator.beep(); } + }); + + // RSS specific mappings + liberator.mappings.add(modes, ["p"], + "Open RSS message in browser", + function () + { + try + { + if (liberator.mail.currentAccount.server.type == "rss") + OpenBrowserWithMessageId(gDBView.hdrForFirstSelectedMessage.messageId) + // TODO: what to do for non-rss message? } catch (e) { liberator.beep(); } }); diff --git a/content/muttator.js b/content/muttator.js index aae209b5..3dbffa3e 100644 --- a/content/muttator.js +++ b/content/muttator.js @@ -127,6 +127,10 @@ liberator.config = { liberator.mappings.add([liberator.modes.COMPOSE], ["i"], "Select message body", function () { SetMsgBodyFrameFocus(); }); + + liberator.mappings.add([liberator.modes.COMPOSE], + ["q", "ZQ"], "Close composer", + function () { window.close(); }); } else {