diff options
author | Samy Pessé <samypesse@gmail.com> | 2014-04-14 16:34:19 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2014-04-14 16:34:19 +0200 |
commit | 9f1ba8483b3484391ca1cf5b3ed6005d97e0693b (patch) | |
tree | d12c06a056e30bf42e144f5e52643cee86243ece /theme/javascript/core | |
parent | 6da48764e89dc7cdf050126624ea23ba1dad5d76 (diff) | |
download | gitbook-9f1ba8483b3484391ca1cf5b3ed6005d97e0693b.zip gitbook-9f1ba8483b3484391ca1cf5b3ed6005d97e0693b.tar.gz gitbook-9f1ba8483b3484391ca1cf5b3ed6005d97e0693b.tar.bz2 |
Merge head styles so that ace stays stable
Diffstat (limited to 'theme/javascript/core')
-rwxr-xr-x | theme/javascript/core/navigation.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/theme/javascript/core/navigation.js b/theme/javascript/core/navigation.js index 31a7cd6..2a08dab 100755 --- a/theme/javascript/core/navigation.js +++ b/theme/javascript/core/navigation.js @@ -28,7 +28,15 @@ define([ var $page = $(html); var $pageHead = $page.find("[data-element=head]"); - $("head").html($pageHead.html()); + // Merge heads + var headContent = $pageHead.html() + + $("head style").each(function() { + headContent = headContent + this.outerHTML + }); + $("head").html(headContent); + + // Update header, body and summary $('.book-header').html($page.find('.book-header').html()); $('.book-body').html($page.find('.book-body').html()); $('.book-summary').html($page.find('.book-summary').html()); |