summaryrefslogtreecommitdiffstats
path: root/assets/javascript/app.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2014-04-04 14:10:56 -0700
committerSamy Pessé <samypesse@gmail.com>2014-04-04 14:10:56 -0700
commit446d486a0fb725f3df76d9b6e8d2bca02042805b (patch)
treecfd5405f607fcca196ef5bad6b0b88662c30ccb9 /assets/javascript/app.js
parent07101deaefb8848d40231eea12a3bf0710e6a78e (diff)
downloadgitbook-446d486a0fb725f3df76d9b6e8d2bca02042805b.zip
gitbook-446d486a0fb725f3df76d9b6e8d2bca02042805b.tar.gz
gitbook-446d486a0fb725f3df76d9b6e8d2bca02042805b.tar.bz2
Add base for theming
Diffstat (limited to 'assets/javascript/app.js')
-rw-r--r--assets/javascript/app.js48
1 files changed, 0 insertions, 48 deletions
diff --git a/assets/javascript/app.js b/assets/javascript/app.js
deleted file mode 100644
index d623e58..0000000
--- a/assets/javascript/app.js
+++ /dev/null
@@ -1,48 +0,0 @@
-require([
- "jQuery",
- "utils/storage",
- "utils/analytic",
- "utils/sharing",
-
- "core/state",
- "core/keyboard",
- "core/exercise",
- "core/progress",
- "core/sidebar"
-], function($, storage, analytic, sharing, _state, keyboard, exercise, progress, sidebar){
- $(document).ready(function() {
- var state = _state();
- var $book = state.$book;
-
- // Initialize storage
- storage.setBaseKey(state.githubId);
-
- // Tract page view
- analytic.track("View");
-
- // Init sidebar
- sidebar.init();
-
- // Init keyboard
- keyboard.init();
-
- // Star and watch count
- $.getJSON("https://api.github.com/repos/"+state.githubId)
- .done(function(repo) {
- $book.find(".count-star span").text(repo.stargazers_count);
- $book.find(".count-watch span").text(repo.subscribers_count);
- });
-
- // Bind exercise
- exercise.init();
-
- // Bind sharing button
- sharing.init();
-
- // Show progress
- progress.show();
-
- // Focus on content
- $(".book-body").focus();
- });
-}); \ No newline at end of file