mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 17:27:58 +01:00
Add Clear button to :downloads.
--HG-- extra : transplant_source : %14%3E%7Dk%3F%D0Q%DF%D4BdO%D0q%1D%A4D%E5%09%E9
This commit is contained in:
@@ -893,20 +893,21 @@ var CommandLine = Module("commandline", {
|
||||
*/
|
||||
input: function _input(prompt, callback, extra) {
|
||||
extra = extra || {};
|
||||
let closure = extra.closure || extra;
|
||||
|
||||
this._input = {
|
||||
submit: callback || extra.onAccept,
|
||||
change: extra.onChange,
|
||||
complete: extra.completer,
|
||||
cancel: extra.onCancel
|
||||
submit: callback || closure.onAccept,
|
||||
change: closure.onChange,
|
||||
complete: closure.completer,
|
||||
cancel: closure.onCancel
|
||||
};
|
||||
|
||||
modes.push(modes.COMMAND_LINE, modes.PROMPT | extra.extended,
|
||||
update(Object.create(extra), {
|
||||
onEvent: extra.onEvent || this.closure.onEvent,
|
||||
onEvent: closure.onEvent || this.closure.onEvent,
|
||||
leave: function leave(stack) {
|
||||
commandline.leave(stack);
|
||||
leave.supercall(this, stack);
|
||||
leave.supercall(extra, stack);
|
||||
},
|
||||
keyModes: [extra.extended, modes.PROMPT]
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user