summaryrefslogtreecommitdiff
path: root/rannak/mangud/arimees/muusika/script.js
diff options
context:
space:
mode:
Diffstat (limited to 'rannak/mangud/arimees/muusika/script.js')
-rwxr-xr-xrannak/mangud/arimees/muusika/script.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/rannak/mangud/arimees/muusika/script.js b/rannak/mangud/arimees/muusika/script.js
new file mode 100755
index 0000000..8803bbe
--- /dev/null
+++ b/rannak/mangud/arimees/muusika/script.js
@@ -0,0 +1,32 @@
+document.addEventListener('DOMContentLoaded', () => {
+ let btn = document.querySelector('.modalButton');
+ btn.click();
+});
+
+
+const selectors = document.querySelectorAll('select');
+
+for(el of selectors){
+ el.addEventListener('change', () => {
+
+ let selected = new Array();
+ for (el of selectors){
+ if (!selected.includes(el.value) && el.value != 'Vali')
+ selected.push(el.value);
+ }
+
+ if (selected.length == 6)
+ moveOnEnable();
+
+ });
+}
+
+
+// If All Else Done
+
+function moveOnEnable(){
+ const btn = document.querySelector(".moveOn");
+ btn.disabled = false;
+ btn.onclick = () => location.href = "";
+}
+