aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/js
diff options
context:
space:
mode:
authorMarvin Borner2019-04-13 19:17:00 +0200
committerMarvin Borner2019-04-13 19:17:00 +0200
commit407cd889cada0154faaa06ff4372e237cf260cf7 (patch)
tree29a7d54576a2872d4fd735022fc3a477ff96d0c3 /src/main/resources/js
parenta1e2fe500b3d3947d05e16698488f99e49f29847 (diff)
Added live counter for brute force detection
Diffstat (limited to 'src/main/resources/js')
-rw-r--r--src/main/resources/js/login.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/resources/js/login.js b/src/main/resources/js/login.js
new file mode 100644
index 0000000..f4e2bce
--- /dev/null
+++ b/src/main/resources/js/login.js
@@ -0,0 +1,7 @@
+const tryAgain = document.getElementById("tryAgain");
+const countdown = document.getElementById("counter");
+
+setInterval(() => {
+ if (Number(countdown.innerText) === 0) tryAgain.style.display = "none";
+ countdown.innerText = Number(countdown.innerText) - 1;
+}, 1000);