lib/main.js
function GetSpeech(result) {
  if (!data.speakText) return;
  result.speakText = "Equation";
  if (data.format !== "MathML") result.speakText = data.math;
  else {
    var jax = MathJax.Hub.getAllJax()[0];
    if (jax.root.alttext) result.speakText = jax.root.alttext;
  }
}
function GetSpeech(result) {
  if (!data.speakText) return;
  result.speakText = "Equation";
  if (data.format !== "MathML") result.speakText = data.math;
  else {
    var jax = MathJax.Hub.getAllJax()[0];
    if (jax.root.alttext) result.speakText = jax.root.alttext;
  }
}
function GetSpeech ( result ) { if ( ! data . speakText ) return ; result . speakText = "Equation" ; if ( data . format !== "MathML" ) result . speakText = data . math ; else { var jax = MathJax . Hub . getAllJax ( ) [ 0 ] ; if ( jax . root . alttext ) result . speakText = jax . root . alttext ; } }
Creates speech string and updates the MathML to include it, if needed
Creates speech string and updates the MathML to include it if needed