Updated the JavaScript for Issue 28.