diff options
| author | root <root@lalalizard.com> | 2012-12-12 13:36:29 -0500 |
|---|---|---|
| committer | root <root@lalalizard.com> | 2012-12-12 13:36:29 -0500 |
| commit | 6e1a9c9dfd83caca61cb0fa12f381900166c10d1 (patch) | |
| tree | f9310fc022739de104b6f77429f9c322d870fd17 /frontend/static/js | |
| parent | 3e0af3308fe3fcb6039a1e16f7497f1c3b6b688c (diff) | |
fix profile.js to load settings in new format
Diffstat (limited to 'frontend/static/js')
| -rw-r--r-- | frontend/static/js/profile.js | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/frontend/static/js/profile.js b/frontend/static/js/profile.js index cf20985..addce07 100644 --- a/frontend/static/js/profile.js +++ b/frontend/static/js/profile.js @@ -246,20 +246,14 @@ var Settings = { Settings.bio = userProfile[6] } + Settings.data = Settings.defaults if (userProfile[7]) // settings - { - var lines = userProfile[7].split("\n") - for (i in lines) - { - var pair = lines[i].split("\t") - Settings.data[pair[0]] = pair[1] - } - } - for (i in Settings.defaults) - { - if (! (i in Settings.data)) - Settings.data[i] = Settings.defaults[i] + { + var s = userProfile[7] + for(i in s){ + Settings.data[i] = s[i] } + } Settings.load() } } |
