1
Fork 0

rename check-theme option into check-themes

This commit is contained in:
Guillaume Gomez 2019-09-14 17:43:10 +02:00
parent bbfd63c89a
commit 7cbf31aa04
5 changed files with 9 additions and 12 deletions

View file

@ -635,7 +635,7 @@ function handleThemeButtonsBlur(e) {{
themePicker.onclick = switchThemeButtonState;
themePicker.onblur = handleThemeButtonsBlur;
[{}].forEach(function(item) {{
{}.forEach(function(item) {{
var but = document.createElement('button');
but.innerHTML = item;
but.onclick = function(el) {{
@ -644,10 +644,7 @@ themePicker.onblur = handleThemeButtonsBlur;
but.onblur = handleThemeButtonsBlur;
themes.appendChild(but);
}});"#,
themes.iter()
.map(|s| format!("\"{}\"", s.replace("\\", "\\\\").replace("\"", "\\\"")))
.collect::<Vec<String>>()
.join(","));
as_json(&themes));
write(cx.dst.join(&format!("theme{}.js", cx.shared.resource_suffix)),
theme_js.as_bytes()
)?;