mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2024-12-24 14:39:48 +00:00
fluoride: Allow submitting the form with Ctrl+Enter
This commit is contained in:
parent
60392e61c7
commit
60ccc9686a
@ -285,6 +285,12 @@ function onPaste(e) {
|
||||
fp.files = dt.files;
|
||||
}
|
||||
|
||||
function onKeydown(e) {
|
||||
if (e.key == 'Enter' && e.ctrlKey) {
|
||||
document.querySelector(".post-form").submit();
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
checkCSRFToken();
|
||||
checkAntiDopamineMode();
|
||||
@ -325,8 +331,10 @@ document.addEventListener("DOMContentLoaded", function() {
|
||||
}
|
||||
|
||||
var pf = document.querySelector(".post-form")
|
||||
if (pf)
|
||||
if (pf) {
|
||||
pf.addEventListener("paste", onPaste);
|
||||
pf.addEventListener("keydown", onKeydown);
|
||||
}
|
||||
});
|
||||
|
||||
// @license-end
|
||||
|
Loading…
Reference in New Issue
Block a user