diff options
author | 0neGal <mail@0negal.com> | 2023-03-05 22:54:35 +0100 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2023-03-05 22:54:35 +0100 |
commit | e666a607a66b560036c853b3a163aedc1b5ab638 (patch) | |
tree | da3e04d952ee1361f88df8f2b0f060912b96e657 /src/app/js/mods.js | |
parent | 7ef891c54e0e9b06efc09e0d5e328d900a31e958 (diff) | |
download | Viper-e666a607a66b560036c853b3a163aedc1b5ab638.tar.gz Viper-e666a607a66b560036c853b3a163aedc1b5ab638.zip |
fixed not being able to toggle mods with updates
Diffstat (limited to 'src/app/js/mods.js')
-rw-r--r-- | src/app/js/mods.js | 6 |
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); |