summaryrefslogtreecommitdiffstats
path: root/theme/javascript/core/state.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-01-20 11:29:26 +0100
committerSamy Pessé <samypesse@gmail.com>2015-01-20 11:29:26 +0100
commit238cd9f7f09f11ecdb1717a5d07fc33642d29043 (patch)
tree72eac94839bda4f32cb41441b2b88532eed52603 /theme/javascript/core/state.js
parentbac25cdf297a7fa54f21977aa17d455e439cdf51 (diff)
downloadgitbook-238cd9f7f09f11ecdb1717a5d07fc33642d29043.zip
gitbook-238cd9f7f09f11ecdb1717a5d07fc33642d29043.tar.gz
gitbook-238cd9f7f09f11ecdb1717a5d07fc33642d29043.tar.bz2
Add back theme
Diffstat (limited to 'theme/javascript/core/state.js')
-rwxr-xr-xtheme/javascript/core/state.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/theme/javascript/core/state.js b/theme/javascript/core/state.js
new file mode 100755
index 0000000..de5c65c
--- /dev/null
+++ b/theme/javascript/core/state.js
@@ -0,0 +1,18 @@
+define([
+ "jQuery"
+], function() {
+ var state = {};
+
+ state.update = function(dom) {
+ var $book = $(dom.find(".book"));
+
+ state.$book = $book;
+ state.level = $book.data("level");
+ state.basePath = $book.data("basepath");
+ state.revision = $book.data("revision");
+ };
+
+ state.update($);
+
+ return state;
+}); \ No newline at end of file