Archived
1
0

only apply theme if parameters are correct

This commit is contained in:
Jeff Becker 2016-03-08 20:35:03 -05:00
parent f32bd8c946
commit 5bc7c92e71
No known key found for this signature in database
GPG Key ID: AB950234D6EA286B

View File

@ -36,13 +36,14 @@ function get_storage() {
}
function enable_theme(prefix, name) {
var theme = document.getElementById("current_theme");
if (theme) {
theme.href = prefix + "static/"+ name + ".css";
var st = get_storage();
st.nntpchan_prefix = prefix;
st.nntpchan_theme = name;
if (prefix && name) {
var theme = document.getElementById("current_theme");
if (theme) {
theme.href = prefix + "static/"+ name + ".css";
var st = get_storage();
st.nntpchan_prefix = prefix;
st.nntpchan_theme = name;
}
}
}