fix localstorage
This commit is contained in:
parent
e97c4bab53
commit
7296bc6944
@ -41,17 +41,14 @@ function enable_theme(prefix, name) {
|
|||||||
if (theme) {
|
if (theme) {
|
||||||
theme.href = prefix + "static/"+ name + ".css";
|
theme.href = prefix + "static/"+ name + ".css";
|
||||||
var st = get_storage();
|
var st = get_storage();
|
||||||
if (st.nntpchan === undefined) {
|
st.setItem("nntpchan_prefix", prefix);
|
||||||
st.nntpchan = {};
|
st.setItem("nntpchan_theme", name);
|
||||||
}
|
|
||||||
st.nntpchan.theme = name;
|
|
||||||
st.nntpchan.prefix = prefix;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
document.onload = function() {
|
document.onload = function() {
|
||||||
var st = get_storage();
|
var st = get_storage();
|
||||||
if (st.nntpchan) {
|
if (st.nntpchan) {
|
||||||
enable_theme(st.nntpchan.prefix, st.nntpchan.theme);
|
enable_theme(st.nntpchan_prefix, st.nntpchan_theme);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user