summaryrefslogtreecommitdiffstats
path: root/theme/javascript/core/state.js
blob: 2f7c633ed3ee267e9e184f60e644b6d9d856f351 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
define([
    "jQuery"
], function() {
    var state = {};

    state.update = function(dom) {
        var $book = $(dom.find(".book"));

        state.$book = $book;
        state.githubId = $book.data("github");
        state.level = $book.data("level");
        state.basePath = $book.data("basepath");
        state.revision = $book.data("revision");
    };

    state.update($);

    return state;
});