mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-22 11:15:47 +01:00
[tele] Fix some broken indentation. Fix commandline.open references. Remove useless try-catch blocks.
This commit is contained in:
@@ -144,7 +144,7 @@ const Addressbook = Module("addressbook", {
|
|||||||
else
|
else
|
||||||
displayName = "-name=\"" + displayName.replace(/"/g, "") + "\"";
|
displayName = "-name=\"" + displayName.replace(/"/g, "") + "\"";
|
||||||
|
|
||||||
commandline.open(":", "contact " + address + " " + displayName, modes.EX);
|
CommandExMode().open("contact " + address + " " + displayName);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
services: function initServices(dactyl, modules, window) {
|
services: function initServices(dactyl, modules, window) {
|
||||||
|
|||||||
@@ -506,10 +506,6 @@ const Mail = Module("mail", {
|
|||||||
MsgOpenNewTabForMessage();
|
MsgOpenNewTabForMessage();
|
||||||
});
|
});
|
||||||
|
|
||||||
/*mappings.add([modes.NORMAL],
|
|
||||||
["o"], "Open a message",
|
|
||||||
function () { commandline.open(":", "open ", modes.EX); });*/
|
|
||||||
|
|
||||||
mappings.add(myModes, ["<Space>"],
|
mappings.add(myModes, ["<Space>"],
|
||||||
"Scroll message or select next unread one",
|
"Scroll message or select next unread one",
|
||||||
function () Events.PASS);
|
function () Events.PASS);
|
||||||
@@ -555,40 +551,29 @@ const Mail = Module("mail", {
|
|||||||
mappings.add(myModes, ["*"],
|
mappings.add(myModes, ["*"],
|
||||||
"Select next message from the same sender",
|
"Select next message from the same sender",
|
||||||
function (args) {
|
function (args) {
|
||||||
try {
|
let author = gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor.toLowerCase();
|
||||||
let author = gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor.toLowerCase();
|
mail.selectMessage(function (msg) msg.mime2DecodedAuthor.toLowerCase().indexOf(author) == 0, true, true, false, args.count);
|
||||||
mail.selectMessage(function (msg) msg.mime2DecodedAuthor.toLowerCase().indexOf(author) == 0, true, true, false, args.count);
|
|
||||||
}
|
|
||||||
catch (e) { dactyl.beep(); }
|
|
||||||
},
|
},
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
mappings.add(myModes, ["#"],
|
mappings.add(myModes, ["#"],
|
||||||
"Select previous message from the same sender",
|
"Select previous message from the same sender",
|
||||||
function (args) {
|
function (args) {
|
||||||
try {
|
let author = gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor.toLowerCase();
|
||||||
let author = gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor.toLowerCase();
|
mail.selectMessage(function (msg) msg.mime2DecodedAuthor.toLowerCase().indexOf(author) == 0, true, true, true, args.count);
|
||||||
mail.selectMessage(function (msg) msg.mime2DecodedAuthor.toLowerCase().indexOf(author) == 0, true, true, true, args.count);
|
|
||||||
}
|
|
||||||
catch (e) { dactyl.beep(); }
|
|
||||||
},
|
},
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
// SENDING MESSAGES
|
// SENDING MESSAGES
|
||||||
mappings.add(myModes, ["m"],
|
mappings.add(myModes, ["m"],
|
||||||
"Compose a new message",
|
"Compose a new message",
|
||||||
function () { commandline.open(":", "mail -subject=", modes.EX); });
|
function () { CommandExMode().open("mail -subject="); });
|
||||||
|
|
||||||
mappings.add(myModes, ["M"],
|
mappings.add(myModes, ["M"],
|
||||||
"Compose a new message to the sender of selected mail",
|
"Compose a new message to the sender of selected mail",
|
||||||
function () {
|
function () {
|
||||||
try {
|
let to = mail._escapeRecipient(gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor);
|
||||||
let to = mail._escapeRecipient(gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor);
|
CommandExMode().open("mail " + to + " -subject=");
|
||||||
commandline.open(":", "mail " + to + " -subject=", modes.EX);
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
dactyl.beep();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
mappings.add(myModes, ["r"],
|
mappings.add(myModes, ["r"],
|
||||||
@@ -658,15 +643,15 @@ const Mail = Module("mail", {
|
|||||||
// MOVING MAIL
|
// MOVING MAIL
|
||||||
mappings.add(myModes, ["c"],
|
mappings.add(myModes, ["c"],
|
||||||
"Change folders",
|
"Change folders",
|
||||||
function () { commandline.open(":", "goto ", modes.EX); });
|
function () { CommandExMode().open("goto "); });
|
||||||
|
|
||||||
mappings.add(myModes, ["s"],
|
mappings.add(myModes, ["s"],
|
||||||
"Move selected messages",
|
"Move selected messages",
|
||||||
function () { commandline.open(":", "moveto ", modes.EX); });
|
function () { CommandExMode().open("moveto "); });
|
||||||
|
|
||||||
mappings.add(myModes, ["S"],
|
mappings.add(myModes, ["S"],
|
||||||
"Copy selected messages",
|
"Copy selected messages",
|
||||||
function () { commandline.open(":", "copyto ", modes.EX); });
|
function () { CommandExMode().open("copyto "); });
|
||||||
|
|
||||||
mappings.add(myModes, ["<C-s>"],
|
mappings.add(myModes, ["<C-s>"],
|
||||||
"Archive message",
|
"Archive message",
|
||||||
|
|||||||
Reference in New Issue
Block a user