resources/www/scripts/explorer.js
function(math) {
      var id = math.id;
      var jax = MathJax.Hub.getJaxFor(id);
      var mathml = jax.root.toMathML();
      if (!math.getAttribute('haslabel')) {
        Explorer.AddMathLabel(mathml, id);
      }
      if (math.getAttribute('hasspeech')) return;
      switch (Assistive.getOption('generation')) {
        case 'eager':
          Explorer.AddSpeechEager(mathml, id);
          break;
        case 'mixed':
          var complexity = math.querySelectorAll('[data-semantic-complexity]');
          if (complexity.length >= Assistive.eagerComplexity) {
            Explorer.AddSpeechEager(mathml, id);
          }
          break;
        case 'lazy':
        default:
          break;
      }
    }
function(math) {
      var id = math.id;
      var jax = MathJax.Hub.getJaxFor(id);
      var mathml = jax.root.toMathML();
      if (!math.getAttribute('haslabel')) {
        Explorer.AddMathLabel(mathml, id);
      }
      if (math.getAttribute('hasspeech')) return;
      switch (Assistive.getOption('generation')) {
        case 'eager':
          Explorer.AddSpeechEager(mathml, id);
          break;
        case 'mixed':
          var complexity = math.querySelectorAll('[data-semantic-complexity]');
          if (complexity.length >= Assistive.eagerComplexity) {
            Explorer.AddSpeechEager(mathml, id);
          }
          break;
        case 'lazy':
        default:
          break;
      }
    }
function ( math ) { var id = math . id ; var jax = MathJax . Hub . getJaxFor ( id ) ; var mathml = jax . root . toMathML ( ) ; if ( ! math . getAttribute ( 'haslabel' ) ) { Explorer . AddMathLabel ( mathml , id ) ; } if ( math . getAttribute ( 'hasspeech' ) ) return ; switch ( Assistive . getOption ( 'generation' ) ) { case 'eager' : Explorer . AddSpeechEager ( mathml , id ) ; break ; case 'mixed' : var complexity = math . querySelectorAll ( '[data-semantic-complexity]' ) ; if ( complexity . length >= Assistive . eagerComplexity ) { Explorer . AddSpeechEager ( mathml , id ) ; } break ; case 'lazy' : default : break ; } }
Add speech output.
Add speech output .