diff options
Diffstat (limited to 'web/navigation.js')
-rw-r--r-- | web/navigation.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/web/navigation.js b/web/navigation.js new file mode 100644 index 0000000..c7830a8 --- /dev/null +++ b/web/navigation.js @@ -0,0 +1,11 @@ +/* + * Copyright (c) 2012-2014 Kaarle Ritvanen + * See LICENSE file for license details + */ + +define(["jquery", "jquery-bbq"], function($) { + return { + getPath: function() { return decodeURI($.param.fragment()); }, + setPath: function(path) { $.bbq.pushState("#" + encodeURI(path)); } + }; +}); |