mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 11:58:00 +01:00
[muttator] new keybindings
This commit is contained in:
@@ -103,6 +103,11 @@ liberator.Mail = function () //{{{
|
|||||||
return [0, liberator.completion.filter(completions, filter)];
|
return [0, liberator.completion.filter(completions, filter)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getRSSUrl()
|
||||||
|
{
|
||||||
|
return gDBView.hdrForFirstSelectedMessage.messageId.replace(/(#.*)?@.*$/, "");
|
||||||
|
}
|
||||||
|
|
||||||
function moveOrCopy(copy, destinationFolder, operateOnThread)
|
function moveOrCopy(copy, destinationFolder, operateOnThread)
|
||||||
{
|
{
|
||||||
if (!destinationFolder)
|
if (!destinationFolder)
|
||||||
@@ -612,7 +617,7 @@ liberator.Mail = function () //{{{
|
|||||||
});
|
});
|
||||||
|
|
||||||
// YANKING TEXT
|
// YANKING TEXT
|
||||||
liberator.mappings.add(modes, ["ys"],
|
liberator.mappings.add(modes, ["Y"],
|
||||||
"Yank subject",
|
"Yank subject",
|
||||||
function ()
|
function ()
|
||||||
{
|
{
|
||||||
@@ -624,14 +629,30 @@ liberator.Mail = function () //{{{
|
|||||||
catch (e) { liberator.beep(); }
|
catch (e) { liberator.beep(); }
|
||||||
});
|
});
|
||||||
|
|
||||||
liberator.mappings.add(modes, ["yf"],
|
liberator.mappings.add(modes, ["y"],
|
||||||
"Yank From:",
|
"Yank sender or feed URL",
|
||||||
function ()
|
function ()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var author = gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor;
|
if (liberator.mail.currentAccount.server.type == "rss")
|
||||||
liberator.util.copyToClipboard(author, true);
|
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(); }
|
catch (e) { liberator.beep(); }
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -127,6 +127,10 @@ liberator.config = {
|
|||||||
liberator.mappings.add([liberator.modes.COMPOSE],
|
liberator.mappings.add([liberator.modes.COMPOSE],
|
||||||
["i"], "Select message body",
|
["i"], "Select message body",
|
||||||
function () { SetMsgBodyFrameFocus(); });
|
function () { SetMsgBodyFrameFocus(); });
|
||||||
|
|
||||||
|
liberator.mappings.add([liberator.modes.COMPOSE],
|
||||||
|
["q", "ZQ"], "Close composer",
|
||||||
|
function () { window.close(); });
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user