mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 13:28:11 +01:00
Move application specific modes to config.modes.
This commit is contained in:
@@ -275,11 +275,6 @@ const modes = (function () //{{{
|
|||||||
self.addMode("CARET"); // text cursor is visible
|
self.addMode("CARET"); // text cursor is visible
|
||||||
self.addMode("TEXTAREA", { char: "i" }); // text cursor is in a HTMLTextAreaElement
|
self.addMode("TEXTAREA", { char: "i" }); // text cursor is in a HTMLTextAreaElement
|
||||||
self.addMode("CUSTOM", { display: function () plugins.mode });
|
self.addMode("CUSTOM", { display: function () plugins.mode });
|
||||||
// FIXME: These belong elsewhere
|
|
||||||
// So too, probably, do most of the others.
|
|
||||||
self.addMode("MESSAGE", { char: "m" }); // for now only used in Muttator when the message has focus
|
|
||||||
self.addMode("COMPOSE");
|
|
||||||
self.addMode("PLAYER", { char: "p" }); // Player mode for songbird
|
|
||||||
// extended modes, can include multiple modes, and even main modes
|
// extended modes, can include multiple modes, and even main modes
|
||||||
self.addMode("EX", true);
|
self.addMode("EX", true);
|
||||||
self.addMode("HINTS", true);
|
self.addMode("HINTS", true);
|
||||||
@@ -293,6 +288,9 @@ const modes = (function () //{{{
|
|||||||
self.addMode("LINE", true); // linewise visual mode
|
self.addMode("LINE", true); // linewise visual mode
|
||||||
self.addMode("PROMPT", true);
|
self.addMode("PROMPT", true);
|
||||||
|
|
||||||
|
if (config.modes)
|
||||||
|
config.modes.forEach(function (mode) { self.addMode.apply(self, mode) });
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
//}}}
|
//}}}
|
||||||
})(); //}}}
|
})(); //}}}
|
||||||
|
|||||||
@@ -123,6 +123,11 @@ const config = { //{{{
|
|||||||
"various.html"
|
"various.html"
|
||||||
],*/
|
],*/
|
||||||
|
|
||||||
|
modes: [
|
||||||
|
["MESSAGE", { char: "m" }],
|
||||||
|
["COMPOSE"]
|
||||||
|
],
|
||||||
|
|
||||||
optionDefaults: {
|
optionDefaults: {
|
||||||
showtabline: 1,
|
showtabline: 1,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -163,6 +163,8 @@ const config = { //{{{
|
|||||||
"developer.html", "various.html", "index.html", "version.html"
|
"developer.html", "various.html", "index.html", "version.html"
|
||||||
],
|
],
|
||||||
|
|
||||||
|
modes: [["PLAYER", { char: "p" }]],
|
||||||
|
|
||||||
optionDefaults: {
|
optionDefaults: {
|
||||||
showtabline: 2,
|
showtabline: 2,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user