function clickSave() {
  // Only save if there are unsaved changes still to be saved -- hence save
  // button visible -- and if ready for a save (not in the process of saving
  // already).
  const saveButton = $('#save');
  if (saveButton.css('visibility') == 'visible' &&
      saveButton.text() == 'save') {
    saveButton.click();
  }
}
/**
 * Clicks the 'save' button if ready for a save.
 */
Clicks the 'save' button if ready for a save.
Clicks the ' save ' button if ready for a save .
function clickSave() {
  const saveButton = $('#save');
  if (saveButton.css('visibility') == 'visible' &&
      saveButton.text() == 'save') {
    saveButton.click();
  }
}
function clickSave ( ) { const saveButton = $ ( '#save' ) ; if ( saveButton . css ( 'visibility' ) == 'visible' && saveButton . text ( ) == 'save' ) { saveButton . click ( ) ; } }
Clicks the 'save' button if ready for a save.
Clicks the ' save ' button if ready for a save .
// Only save if there are unsaved changes still to be saved -- hence save // button visible -- and if ready for a save (not in the process of saving // already).