[imp] website_slides: optimize code of slides js