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 | c8980b86f8dfc37ede19463d7d126bc49e5cb2c4 (patch) | |
tree | 8a3e2d6a537ef425d798069e1b0c86f647d28b58 /phonegap/www/js/mobile.js | |
parent | 9e24fa120dc9b9399e0e66f0059b0c3338eafd91 (diff) |
use localstorage as it is less clunky and actually works for android
Diffstat (limited to 'phonegap/www/js/mobile.js')
-rw-r--r-- | phonegap/www/js/mobile.js | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/phonegap/www/js/mobile.js b/phonegap/www/js/mobile.js index c50403bc5..7300e752c 100644 --- a/phonegap/www/js/mobile.js +++ b/phonegap/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; } |