Favoritenfunktion! #55

This commit is contained in:
ben8
2025-04-11 18:18:34 +02:00
parent 04ce8104fe
commit 2a7e39bbd0
9 changed files with 220 additions and 12 deletions

View File

@@ -619,5 +619,20 @@ document.addEventListener('DOMContentLoaded', function() {
document.getElementById('filterPanel').classList.toggle('show');
});
});
if (window.location.pathname === "/library/") {
window.addEventListener("beforeunload", function () {
localStorage.setItem("meine_seite_scroll", window.scrollY);
});
window.addEventListener("load", function () {
const scrollPos = localStorage.getItem("meine_seite_scroll");
if (scrollPos !== null) {
window.scrollTo(0, parseInt(scrollPos));
}
});
}
</script>
{% endblock content %}