Skip to content

Commit 9242afd

Browse files
authored
Merge pull request #368 from maxim-belkin/aio-fixes
aio.md: fix indentation and variable declaration
2 parents a8fde65 + c40e552 commit 9242afd

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

bin/boilerplate/aio.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@
1515
xmlHttp[i] = new XMLHttpRequest();
1616
xmlHttp[i].episode = lesson_episodes[i]; /* To enable use this later. */
1717
xmlHttp[i].onreadystatechange = function() {
18-
if (this.readyState == 4 && this.status == 200) {
19-
var article_here = document.getElementById(this.episode);
20-
var parser = new DOMParser();
21-
var htmlDoc = parser.parseFromString(this.responseText,"text/html");
22-
var htmlDocArticle = htmlDoc.getElementsByTagName("article")[0];
23-
article_here.innerHTML = htmlDocArticle.innerHTML;
18+
if (this.readyState == 4 && this.status == 200) {
19+
var article_here = document.getElementById(this.episode);
20+
var parser = new DOMParser();
21+
var htmlDoc = parser.parseFromString(this.responseText,"text/html");
22+
var htmlDocArticle = htmlDoc.getElementsByTagName("article")[0];
23+
article_here.innerHTML = htmlDocArticle.innerHTML;
2424
}
2525
}
26-
episode_url = "{{ relative_root_path }}" + lesson_episodes[i];
26+
var episode_url = "{{ relative_root_path }}" + lesson_episodes[i];
2727
xmlHttp[i].open("GET", episode_url);
2828
xmlHttp[i].send(null);
2929
}
3030
}
3131
</script>
3232
{% comment %}
33-
Create anchor for each one of the episodes.
33+
Create an anchor for every episode.
3434
{% endcomment %}
3535
{% for episode in site.episodes %}
3636
<article id="{{ episode.url }}"></article>

0 commit comments

Comments
 (0)