diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-10-27 12:18:04 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-10-27 12:18:04 +0100 |
commit | 0521defb635075165699c8729ef849e69492b3b5 (patch) | |
tree | 1b3fc2b1ffad63010ddae8ba7c7061897ecef78d /theme/javascript/state.js | |
parent | ea4d96610f98da3f692dfd424e2840ab30e61e36 (diff) | |
download | gitbook-0521defb635075165699c8729ef849e69492b3b5.zip gitbook-0521defb635075165699c8729ef849e69492b3b5.tar.gz gitbook-0521defb635075165699c8729ef849e69492b3b5.tar.bz2 |
Add 'chapterTitle' to gitbook.state api
Diffstat (limited to 'theme/javascript/state.js')
-rw-r--r-- | theme/javascript/state.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/theme/javascript/state.js b/theme/javascript/state.js index 34e94fe..5e9083f 100644 --- a/theme/javascript/state.js +++ b/theme/javascript/state.js @@ -17,6 +17,9 @@ state.update = function(dom) { // Original path of the file state.filepath = $book.data('filepath'); + // Title of the chapter + state.chapterTitle = $book.data('chapter-title'); + // Absolute url to the root of the book state.root = url.resolve( location.protocol+'//'+location.host, |