2
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-10 01:13:33 +00:00

Fix for back function on simple search

This commit is contained in:
Ozzie Isaacs 2024-08-03 12:57:55 +02:00
parent 3aa72c8afb
commit abc923ade4

View File

@ -160,15 +160,18 @@ $(document).ready(function() {
$(".session").click(function() {
window.sessionStorage.setItem("back", window.location.pathname);
window.sessionStorage.setItem("search", window.location.search);
});
$("#back").click(function() {
var loc = sessionStorage.getItem("back");
var param = sessionStorage.getItem("search");
if (!loc) {
loc = $(this).data("back");
}
sessionStorage.removeItem("back");
window.location.href = loc;
sessionStorage.removeItem("search");
window.location.href = loc + param;
});