diff --git a/src/main/resources/public/post.js b/src/main/resources/public/post.js index a68b91d..6e8d028 100644 --- a/src/main/resources/public/post.js +++ b/src/main/resources/public/post.js @@ -1,3 +1,6 @@ -document.addEventListener("DOMContentLoaded", function () { +window.handleState = function handleState() { + if (document.readyState === 'interactive' || document.readyState === "complete") { document.forms[0].submit(); -}); + } +}; +document.onreadystatechange = window.handleState;