Remove unused JavaScript function #361