function setupGlobals()

in ArticleTemplates/assets/js/modules/comments.js [291:314]


function setupGlobals() {
    window.articleCommentsInserter = articleCommentsInserter;
    // Almost the same as window.articleCommentsInserter - WHY?
    window.commentsInserter = commentsInserter;
    window.articleCommentsFailed = articleCommentsFailed;
    // Exactly the same as window.articleCommentsFailed - WHY?
    window.commentsFailed = articleCommentsFailed;
    window.commentsEnd = commentsEnd;
    window.commentsExpand = commentsExpand;
    window.scrollToHighlighted = scrollToHighlighted;
    window.commentsClosed = commentsClosed;
    window.commentsOpen = commentsOpen;
    window.commentTime = commentTime;
    window.commentsRecommendIncrease = commentsRecommendIncrease;
    window.commentsRecommendDecrease = commentsRecommendDecrease;
    window.checkForCorrectCount = checkForCorrectCount;

    window.applyNativeFunctionCall('articleCommentsInserter');
    window.applyNativeFunctionCall('commentsInserter');
    window.applyNativeFunctionCall('commentsFailed');
    window.applyNativeFunctionCall('commentsClosed');
    window.applyNativeFunctionCall('commentsOpen');
    window.applyNativeFunctionCall('articleCommentsFailed');
}