mirror of
https://git.phreedom.club/localhost_frssoft/bloat.git
synced 2024-11-22 12:01:27 +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;
|
fp.files = dt.files;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onKeydown(e) {
|
||||||
|
if (e.key == 'Enter' && e.ctrlKey) {
|
||||||
|
document.querySelector(".post-form").submit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
checkCSRFToken();
|
checkCSRFToken();
|
||||||
checkAntiDopamineMode();
|
checkAntiDopamineMode();
|
||||||
|
@ -325,8 +331,10 @@ document.addEventListener("DOMContentLoaded", function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
var pf = document.querySelector(".post-form")
|
var pf = document.querySelector(".post-form")
|
||||||
if (pf)
|
if (pf) {
|
||||||
pf.addEventListener("paste", onPaste);
|
pf.addEventListener("paste", onPaste);
|
||||||
|
pf.addEventListener("keydown", onKeydown);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// @license-end
|
// @license-end
|
||||||
|
|
Loading…
Reference in a new issue