haldis/app/static/js/customThemes.js
Midgard b44d34003d
Make whitespace match convention
Convention according to our EditorConfig.
2020-02-29 17:37:33 +01:00

11 lines
391 B
JavaScript

function changeTheme() {
// Get the selected theme for the dropdown
var themes_select = document.getElementById("themes_select");
var selected_theme = themes_select.options[themes_select.selectedIndex].text;
// Update the theme cookie
document.cookie = "theme=" + escape(selected_theme) + "; Path=/;"
// Finally reload the page to let the new theme take effect
location.reload();
}