fix the javascript to use the new, more complete format