diff --git a/js/controller.js b/js/controller.js index 71da2d9..1b9fb39 100644 --- a/js/controller.js +++ b/js/controller.js @@ -26,7 +26,7 @@ class Controller { init(videoToLoad) { this.loadXml(videoToLoad).then( function (v) { - this.view.drawCommenttitles(v); + this.view.drawCommentTitles(v); this.addEventListeners(); this.view.drawCommentsToVideo(v); }.bind(this) diff --git a/js/view.js b/js/view.js index 87ab9bf..6bc4f4a 100644 --- a/js/view.js +++ b/js/view.js @@ -21,7 +21,7 @@ class View { ); */ } - drawCommenttitles(comments) { + drawCommentTitles(comments) { let aside = document.getElementsByTagName("aside")[0]; for (let i = 0; i < comments.length; i++) { @@ -49,11 +49,11 @@ class View { comment.appendChild(time); - let commenttitle = document.createElement("div"); - commenttitle.setAttribute("class", "commentText"); - commenttitle.innerHTML = comments[i].title; + let commentTitle = document.createElement("div"); + commentTitle.setAttribute("class", "commentText"); + commentTitle.innerHTML = comments[i].title; - comment.appendChild(commenttitle); + comment.appendChild(commentTitle); aside.appendChild(comment);