fix script registration for switch between image or html slit