1
0
mirror of https://gitlab.com/brutaldon/brutaldon.git synced 2024-12-04 14:46:24 -05:00

savePlace and restorePlace are no longer needed since we junked PJAX

This commit is contained in:
Jason McBrayer 2018-09-20 19:16:22 -04:00
parent 78157b9647
commit def0256fee

View File

@ -146,21 +146,3 @@ function characterCount()
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;
}