 'https://texmath.johnmacfarlane.net/', true);
      xhr.setRequestHeader('Accept', 'application/json');
      xhr.setRequestHeader('Content-Type', 'application/json');
      xhr.onreadystatechange = function () {
        var res = null;
        if (xhr.readyState === 4) {
          if (xhr.status === 204 || xhr.status === 205) {
            onSuccess();
          } else if (xhr.status >= 200 && xhr.status < 300) {
            try { res = JSON.parse(xhr.responseText); } catch (e) { onError(e); }
           