js mainpage improve