Few fixes for multiple themes support feature

This commit is contained in:
Guillaume Gomez
2018-01-23 22:10:16 +01:00
parent 3a39b2aa5a
commit e78f1392b7
5 changed files with 48 additions and 24 deletions

View File

@@ -918,12 +918,12 @@ themePicker.onclick = function() {{
}}
}};
[{}].forEach(function(item) {{
var div = document.createElement('div');
div.innerHTML = item;
div.onclick = function(el) {{
var but = document.createElement('button');
but.innerHTML = item;
but.onclick = function(el) {{
switchTheme(currentTheme, mainTheme, item);
}};
themes.appendChild(div);
themes.appendChild(but);
}});
"#, themes.iter()
.map(|s| format!("\"{}\"", s))