Template source: _article_single_js.html

{% load staticfiles %} <script src="{% static 'dist/js/article_reader.js' %}?v=2"></script> <script> document.body.scrollIntoView(); var article_reader_url, push_url; article_reader_url = '{% url 'article_reader' %}'; push_url = true; var article_nav, article_reader, article_history; $(function () { var language_code = '{{ request.LANGUAGE_CODE }}' == 'en' ? '' : '{{ request.LANGUAGE_CODE }}'; article_nav = new ArticleNav($('#articles-nav'), article_reader_url); article_reader = new ArticleReader($('#articles-scroll'), article_reader_url, article_nav, push_url, language_code); var current_user = {% if not request.user.is_anonymous %}{{ request.user.pk }}{% else %} 0 {% endif %}; {% for article in nav_articles %} article_nav.add_article({{ article.pk }}, '{{ article.slug|escapejs }}', '{{ article.title|escapejs }}', null, '{{ article.master_category.slug|escapejs }}', {{ article.author.pk }}, current_user ); {% endfor %} {% for article in articles %} article_reader.add_article({{ article.pk }}, '{{ article.slug|escapejs }}', '{{ article.title|escapejs }}', null, '{{ article.master_category.title|escapejs }}', {{ article.author.pk }}, current_user ); {% endfor %} article_nav.init_scroll(); article_reader.init_scroll(); update_share_gonative(); }); $(".article-body").find("a").attr('target','_blank'); </script>