Spaces:
Running
Running
Update static/script.js
Browse files- static/script.js +8 -0
static/script.js
CHANGED
@@ -44,8 +44,16 @@ document.addEventListener("DOMContentLoaded", function () {
|
|
44 |
document.getElementById("loading").style.display = "block";
|
45 |
}
|
46 |
|
|
|
|
|
|
|
|
|
47 |
document.querySelector("select[name='tasks']").addEventListener("change", toggleElements);
|
48 |
document.getElementById("user_text").addEventListener("input", updateCount);
|
|
|
|
|
|
|
|
|
49 |
|
50 |
toggleElements();
|
51 |
updateCount();
|
|
|
44 |
document.getElementById("loading").style.display = "block";
|
45 |
}
|
46 |
|
47 |
+
function hideLoading() {
|
48 |
+
document.getElementById("loading").style.display = "none";
|
49 |
+
}
|
50 |
+
|
51 |
document.querySelector("select[name='tasks']").addEventListener("change", toggleElements);
|
52 |
document.getElementById("user_text").addEventListener("input", updateCount);
|
53 |
+
|
54 |
+
document.getElementById("textForm").addEventListener("submit", function () {
|
55 |
+
showLoading();
|
56 |
+
});
|
57 |
|
58 |
toggleElements();
|
59 |
updateCount();
|