summaryrefslogtreecommitdiffstats
path: root/theme/javascript/state.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-10-27 12:18:04 +0100
committerSamy Pessé <samypesse@gmail.com>2015-10-27 12:18:04 +0100
commit0521defb635075165699c8729ef849e69492b3b5 (patch)
tree1b3fc2b1ffad63010ddae8ba7c7061897ecef78d /theme/javascript/state.js
parentea4d96610f98da3f692dfd424e2840ab30e61e36 (diff)
downloadgitbook-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.js3
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,