summaryrefslogtreecommitdiffstats
path: root/data/js/application.js
diff options
context:
space:
mode:
Diffstat (limited to 'data/js/application.js')
-rw-r--r--data/js/application.js18
1 files changed, 17 insertions, 1 deletions
diff --git a/data/js/application.js b/data/js/application.js
index 9cb1a050f..d0e7c649f 100644
--- a/data/js/application.js
+++ b/data/js/application.js
@@ -1,6 +1,22 @@
(function () {
'use strict';
-define(['require', 'vendor'], function (require) {
+define(['require', 'util', 'vendor'], function (require, Util) {
require(['script']);
+ var App = {
+ // Gets called for every request
+ initialize: function () {
+ this.setupLineHighlight();
+ },
+ // Gets called for every request on page load
+ onPageLoaded: function () {
+ Util.highlightLineFromHash();
+ },
+
+ setupLineHighlight: function () {
+ $(window).on('hashchange', Util.highlightLineFromHash);
+ }
+ };
+
+ return App;
});
})();