apply script js