mirror of
https://gitlab.com/brutaldon/brutaldon
synced 2025-06-05 21:49:32 +02:00
savePlace and restorePlace are no longer needed since we junked PJAX
This commit is contained in:
@ -146,21 +146,3 @@ function characterCount()
|
|||||||
return $("#id_status").val().length + $("#id_spoiler_text").val().length;
|
return $("#id_status").val().length + $("#id_spoiler_text").val().length;
|
||||||
}
|
}
|
||||||
|
|
||||||
function savePlace()
|
|
||||||
{
|
|
||||||
sessionStorage.setItem("lastScrollPos", window.scrollY);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
function restorePlace(ev)
|
|
||||||
{
|
|
||||||
var lastScrollPos = sessionStorage.getItem('lastScrollPos');
|
|
||||||
Intercooler.ready(function (elt)
|
|
||||||
{
|
|
||||||
if (elt[0].id == 'main')
|
|
||||||
{
|
|
||||||
window.scrollTo(0, lastScrollPos);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user