javascript asset preview