2019-12-17 21:21:17 +00:00
|
|
|
function changeTheme() {
|
2020-02-29 16:23:20 +00:00
|
|
|
// Get the selected theme for the dropdown
|
|
|
|
var themes_select = document.getElementById("themes_select");
|
|
|
|
var selected_theme = themes_select.options[themes_select.selectedIndex].text;
|
2019-12-17 21:21:17 +00:00
|
|
|
|
2020-02-29 16:23:20 +00:00
|
|
|
// Update the theme cookie
|
|
|
|
document.cookie = "theme=" + escape(selected_theme) + "; Path=/;"
|
|
|
|
|
|
|
|
// Finally reload the page to let the new theme take effect
|
|
|
|
location.reload();
|
|
|
|
}
|