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:
parent
3aa72c8afb
commit
abc923ade4
@ -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;
|
||||
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user