Updated threadscroll.js with bettter compatibility