diff --git a/src/main/resources/static/js/darkmode.js b/src/main/resources/static/js/darkmode.js
index fe239583..ebf9c683 100644
--- a/src/main/resources/static/js/darkmode.js
+++ b/src/main/resources/static/js/darkmode.js
@@ -16,6 +16,8 @@ function getElements() {
}
function setMode(mode) {
+ var event = new CustomEvent('modeChanged', { detail: mode });
+ document.dispatchEvent(event);
elements.lightModeStyles.disabled = mode !== "off";
elements.darkModeStyles.disabled = mode !== "on";
elements.rainbowModeStyles.disabled = mode !== "rainbow";
diff --git a/src/main/resources/templates/fragments/langAndDarkMode.html b/src/main/resources/templates/fragments/langAndDarkMode.html
deleted file mode 100644
index 8c6b0ea3..00000000
--- a/src/main/resources/templates/fragments/langAndDarkMode.html
+++ /dev/null
@@ -1,75 +0,0 @@
-