Update repaint.js

Minor changes with syntax corrections.