Favoritenfunktion! #55
This commit is contained in:
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user