ctrl + s now submits the config editor form.
This commit is contained in:
parent
38f7c18e2f
commit
634d21ac2d
@ -22,4 +22,25 @@ sleep(500).then(() => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var ctrlDown = false;
|
||||||
|
var saved = false;
|
||||||
|
$( document ).keydown(function( e ) {
|
||||||
|
if (e.key === 'Control') {
|
||||||
|
ctrlDown = true;
|
||||||
|
}
|
||||||
|
if (e.key === 's' && ctrlDown && !saved) {
|
||||||
|
e.preventDefault(); // prevent save-as-webpage popup
|
||||||
|
saved = true;
|
||||||
|
$("#save-config-btn").trigger("click")
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$( document ).keyup(function( e ) {
|
||||||
|
if (e.key === 'Control') {
|
||||||
|
ctrlDown = false;
|
||||||
|
}
|
||||||
|
if (e.key === 's' && saved) {
|
||||||
|
saved = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
Loading…
x
Reference in New Issue
Block a user