User:KockaAdmiralac/common.js

var btn1 = document.getElementById('checkButton1'); var btn2 = document.getElementById('checkButton2'); var btn3 = document.getElementById('checkButton3'); var btn4 = document.getElementById('checkButton4'); var btn5 = document.getElementById('checkButton5'); var btn6 = document.getElementById('checkButton6'); var btn7 = document.getElementById('checkButton7'); var btn8 = document.getElementById('checkButton8'); var btn9 = document.getElementById('checkButton9'); var btn10 = document.getElementById('checkButton10'); var btn11 = document.getElementById('checkButton11'); btn1.onclick = function { checkFunction1; }; function checkFunction1 { if (btn1.classList.contains('checkTag')) { btn1.className = 'checkTagActive'; } else { if (btn1.classList.contains('checkTagActive')) { btn1.className = 'checkTag'; } } } btn2.onclick = function { checkFunction2; }; function checkFunction2 { if (btn2.classList.contains('checkTag')) { btn2.className = 'checkTagActive'; } else { if (btn2.classList.contains('checkTagActive')) { btn2.className = 'checkTag'; } } } btn3.onclick = function { checkFunction3; }; function checkFunction3 { if (btn3.classList.contains('checkTag')) { btn3.className = 'checkTagActive'; } else { if (btn3.classList.contains('checkTagActive')) { btn3.className = 'checkTag'; } } } btn4.onclick = function { checkFunction4; }; function checkFunction4 { if (btn4.classList.contains('checkTag')) { btn4.className = 'checkTagActive'; } else { if (btn4.classList.contains('checkTagActive')) { btn4.className = 'checkTag'; } } } btn5.onclick = function { checkFunction5; }; function checkFunction5 { if (btn5.classList.contains('checkTag')) { btn5.className = 'checkTagActive'; } else { if (btn5.classList.contains('checkTagActive')) { btn5.className = 'checkTag'; } } } btn6.onclick = function { checkFunction6; }; function checkFunction6 { if (btn6.classList.contains('checkTag')) { btn6.className = 'checkTagActive'; } else { if (btn6.classList.contains('checkTagActive')) { btn6.className = 'checkTag'; } } } btn7.onclick = function { checkFunction7; }; function checkFunction7 { if (btn7.classList.contains('checkTag')) { btn7.className = 'checkTagActive'; } else { if (btn7.classList.contains('checkTagActive')) { btn7.className = 'checkTag'; } } } btn8.onclick = function { checkFunction8; }; function checkFunction8 { if (btn8.classList.contains('checkTag')) { btn8.className = 'checkTagActive'; } else { if (btn8.classList.contains('checkTagActive')) { btn8.className = 'checkTag'; } } } btn9.onclick = function { checkFunction9; }; function checkFunction9 { if (btn9.classList.contains('checkTag')) { btn9.className = 'checkTagActive'; } else { if (btn9.classList.contains('checkTagActive')) { btn9.className = 'checkTag'; } } } btn10.onclick = function { checkFunction10; }; function checkFunction10 { if (btn10.classList.contains('checkTag')) { btn10.className = 'checkTagActive'; } else { if (btn10.classList.contains('checkTagActive')) { btn10.className = 'checkTag'; } } } btn11.onclick = function { checkFunction11; }; function checkFunction11 { if (btn11.classList.contains('checkTag')) { btn11.className = 'checkTagActive'; } else { if (btn11.classList.contains('checkTagActive')) { btn11.className = 'checkTag'; } } } document.getElementById("verifyButton1").onclick = function { verifyFunction1; }; function verifyFunction1 { if (btn1.classList.contains('checkTagActive') && btn2.classList.contains('checkTagActive') && btn3.classList.contains('checkTagActive') && btn4.classList.contains('checkTagActive') && btn5.classList.contains('checkTagActive') && btn6.classList.contains('checkTagActive') && btn7.classList.contains('checkTagActive') && btn8.classList.contains('checkTagActive') && btn9.classList.contains('checkTagActive') && btn10.classList.contains('checkTagActive')) { btn11.className = 'checkTag visible'; } else { if (btn1.classList.contains('checkTag') || btn2.classList.contains('checkTag') || btn3.classList.contains('checkTag') || btn4.classList.contains('checkTag') || btn5.classList.contains('checkTag') || btn6.classList.contains('checkTag') || btn7.classList.contains('checkTag') || btn8.classList.contains('checkTag') || btn9.classList.contains('checkTag') || btn10.classList.contains('checkTag')) { btn11.className = 'checkTag invisible'; } } }