aboutsummaryrefslogtreecommitdiff
path: root/src/app/js/mods.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/js/mods.js')
-rw-r--r--src/app/js/mods.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/app/js/mods.js b/src/app/js/mods.js
index 19c5bda..4ea3428 100644
--- a/src/app/js/mods.js
+++ b/src/app/js/mods.js
@@ -119,6 +119,12 @@ mods.load = (mods_obj) => {
let mod_el = mod_els[i].cloneNode(true);
mod_el.classList.add("no-animation");
+
+ mod_el.querySelector(".switch").addEventListener("click", () => {
+ if (mod_versions[mod].local_name) {
+ mods.toggle(mod_versions[mod].local_name);
+ }
+ })
mod_els[i].remove();
modsdiv.querySelector(".line").after(mod_el);