Permalink
Browse files

Use mootools parseQueryString to ease extensions

  • Loading branch information...
1 parent 88e9bae commit 8c67f9a35642082c946364c675633aba5af2fb30 @vicb committed Mar 15, 2011
Showing with 14 additions and 10 deletions.
  1. +11 −7 visugps/lib/mootools/mootools-more-1.3.1.1.js
  2. +3 −3 visugps/visugps.html

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -42,10 +42,10 @@
'ts2.victorb.fr',
'ts3.victorb.fr']});
- var trackName = decodeURIComponent(location.search) || 'noparam';
+ var params = location.search.replace(/^\?/, '').parseQueryString();
- if (m = /^\?track=(.*)$/i.exec(trackName)) {
- kMap.downloadTrack(m[1]);
+ if (params.track) {
+ kMap.downloadTrack(params.track);
} else {
kMap.downloadTrack(location.href.replace(/[\w\.]*$/, 'test.igc'));
}

0 comments on commit 8c67f9a

Please sign in to comment.