var newTitle = html?html.match(/<title>(.*?)<\/title>/):'';
if(newTitle){document.title = newTitle[1].trim().decodeHTML();}
+ /* update body class */
+ var body_class_match = html ? html.match(/<body.*class="(.*?)"/) : '';
+ if (body_class_match) {
+ document.body.setAttribute('class', body_class_match[1]);
+ } else {
+ document.body.setAttribute('class', '');
+ }
+
if (push_state !== false) {
if (document.location.hash && $(document.location.hash).length) {
$.scrollTo(document.location.hash, 1000, {offset: 0});
{% block extrascripts %}{% endblock %}
</head>
- <body {% block bodyattr %}{% endblock %}>
+ <body {% block bodyattr %}{% if page %}class="page-{{ page.slug }}"{% endif %}{% endblock %}>
<div id="All">
{% block meta %}<div id="metaNav">{% include "includes/metaNav.html" %}</div>{% endblock %}
<div id="Commons">