Very useful script. But when opening the permalink of a comment, the header get in front of the start of the coment.
I added this to solve this here: if (!!document.URL.match(/#.{7}$/) && !!$(document.URL.match(/#.{7}$/)[0]).length){ $(document.URL.match(/#.{7}$/)[0])[0].scrollIntoView(); if (window.scrollY < window.scrollMaxY){ window.scrollByLines(-3); } }
Nice script, but
Very useful script.
But when opening the permalink of a comment, the header get in front of the start of the coment.
I added this to solve this here:
if (!!document.URL.match(/#.{7}$/) && !!$(document.URL.match(/#.{7}$/)[0]).length){ $(document.URL.match(/#.{7}$/)[0])[0].scrollIntoView(); if (window.scrollY < window.scrollMaxY){ window.scrollByLines(-3); } }