diff options
author | Struan Donald <struan@exo.org.uk> | 2012-03-13 15:20:55 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-03-13 15:20:55 +0000 |
commit | 53e1216be3d57e66ce43c909de3c52a8e923e9ed (patch) | |
tree | 4eb7b62d677df5813d8cbdfde5acd2f93819c2a0 /www/js | |
parent | 0dfc87090dc5e1cf645939bb96154fbf65e43acd (diff) |
use localstorage as it is less clunky and actually works for android
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/mobile.js | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/www/js/mobile.js b/www/js/mobile.js index c50403b..7300e75 100644 --- a/www/js/mobile.js +++ b/www/js/mobile.js @@ -1,22 +1,9 @@ -var urlParams = {}; -(function () { - var e, - a = /\+/g, // Regex for replacing addition symbol with a space - r = /([^&=]+)=?([^&]*)/g, - d = function (s) { return decodeURIComponent(s.replace(a, " ")); }, - q = window.location.search.substring(1); - - // do it this way to get round jslint complaints - for (;;) { - e = r.exec(q); - if (!e) { break; } - urlParams[d(e[1])] = d(e[2]); - } -})(); - function show_around( lat, long ) { pc = $('#pc').val(); - window.location='around.html?pc=' + pc + '&latitude=' + lat + '&longitude=' + long; + localStorage.latitude = lat; + localStorage.longitude = long; + localStorage.pc = pc; + window.location='around.html'; return false; } |