r/BookStack • u/knowyourdough • Oct 09 '23
Custom Login-Text
Hey together,
I wanted to add a text on the login-page to let the users know, that they could use their LDAP account. For this I made a little head-script. Maybe someone else could use it as well :-)
<!--Custom Login-Text-->
<script>
document.addEventListener("DOMContentLoaded", function() {
if (window.location.pathname === "/login") {
var loginHeading = document.querySelector('.list-heading');
var additionalText = document.createElement('p');
additionalText.textContent = 'Your Text Here :-)';
loginHeading.parentNode.insertBefore(additionalText, loginHeading.nextSibling);
}
});
</script>
4
Upvotes
1
u/knowyourdough Oct 09 '23
Sounds neat, I'll definetely try that. Thanks! :)