Update the photocapture.js with proper code format