summaryrefslogtreecommitdiffstats
path: root/theme/javascript/core/state.js
blob: de5c65caccd4c415f0c8bdcb94151713da21916c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
});