Update gallery.js: slice->[].slice