Adding docs JavaScript code