diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-11-30 23:11:28 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-11-30 23:11:28 -0500 |
| commit | 83a884197ff0226631a46e4894f22b8468b15598 (patch) | |
| tree | 4048ed87510ae15d283f63ef799072914ed4b2d3 /StoneIsland/www/js/lib | |
| parent | ef14c875d7056f90be606ebf1f389c112b947f81 (diff) | |
add deep linking lib
Diffstat (limited to 'StoneIsland/www/js/lib')
| -rw-r--r-- | StoneIsland/www/js/lib/_router.js | 11 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/etc/deeplink.js | 3 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/etc/push.js | 1 |
3 files changed, 15 insertions, 0 deletions
diff --git a/StoneIsland/www/js/lib/_router.js b/StoneIsland/www/js/lib/_router.js index b70d9be8..23daf4c7 100644 --- a/StoneIsland/www/js/lib/_router.js +++ b/StoneIsland/www/js/lib/_router.js @@ -47,6 +47,17 @@ var SiteRouter = Router.extend({ } } }, + + initial_route: null, + launch: function(){ + if (this.initial_route) { + this.parseRoute( this.initial_route ) + } + else { + this.route() + } + this.initial_route = null + }, go: function(url){ if (app.view && app.view.hide) { diff --git a/StoneIsland/www/js/lib/etc/deeplink.js b/StoneIsland/www/js/lib/etc/deeplink.js new file mode 100644 index 00000000..648dd167 --- /dev/null +++ b/StoneIsland/www/js/lib/etc/deeplink.js @@ -0,0 +1,3 @@ +function handleOpenURL (url) { + app.router.initial_route = url +}
\ No newline at end of file diff --git a/StoneIsland/www/js/lib/etc/push.js b/StoneIsland/www/js/lib/etc/push.js new file mode 100644 index 00000000..ab0c0141 --- /dev/null +++ b/StoneIsland/www/js/lib/etc/push.js @@ -0,0 +1 @@ +//
\ No newline at end of file |
