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
1 changed files with 0 additions and 18 deletions

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;
}