From 7296bc694452800a4e763069ff33eeb6f8ccd849 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Mon, 7 Mar 2016 20:55:05 -0500 Subject: [PATCH] fix localstorage --- contrib/static/nntpchan.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/contrib/static/nntpchan.js b/contrib/static/nntpchan.js index 4256501..af3db61 100644 --- a/contrib/static/nntpchan.js +++ b/contrib/static/nntpchan.js @@ -41,17 +41,14 @@ function enable_theme(prefix, name) { if (theme) { theme.href = prefix + "static/"+ name + ".css"; var st = get_storage(); - if (st.nntpchan === undefined) { - st.nntpchan = {}; - } - st.nntpchan.theme = name; - st.nntpchan.prefix = prefix; + st.setItem("nntpchan_prefix", prefix); + st.setItem("nntpchan_theme", name); } } document.onload = function() { var st = get_storage(); if (st.nntpchan) { - enable_theme(st.nntpchan.prefix, st.nntpchan.theme); + enable_theme(st.nntpchan_prefix, st.nntpchan_theme); } }