fix javascript bugs in postamble.
[js] tune the scroll duration for `toc` and `back-to-top` button.