Update main.js

add scrolltop after replace content.