added password counter
All checks were successful
Docker Release Build / push_to_registry (push) Successful in 58s
All checks were successful
Docker Release Build / push_to_registry (push) Successful in 58s
This commit is contained in:
@@ -17,13 +17,22 @@
|
||||
}
|
||||
|
||||
function generateNewPassword() {
|
||||
fetch("/api/password")
|
||||
.then(response => response.text())
|
||||
.then(password => {
|
||||
document.getElementById("password").innerText = password;
|
||||
})
|
||||
.catch(error => console.error("Fehler:", error));
|
||||
}
|
||||
fetch("/json/password")
|
||||
.then(response => response.json()) // Jetzt .json() statt .text()
|
||||
.then(data => {
|
||||
// Passwort aktualisieren
|
||||
document.getElementById("password").innerText = data.password;
|
||||
|
||||
// Counter im Footer aktualisieren
|
||||
// Wir suchen das Element mit der Klasse 'badge-blue' (oder gib ihm eine ID)
|
||||
const counterElement = document.querySelector(".badge-blue");
|
||||
if (counterElement) {
|
||||
//counterElement.innerText = data.count;
|
||||
document.getElementById("global-counter").innerText = data.count;
|
||||
}
|
||||
})
|
||||
.catch(error => console.error("Fehler:", error));
|
||||
}
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user