javascript:(function(){const startButtons=document.querySelectorAll('button.zb-button.primary.raised.start-button.start-graphic');let startIndex=0;function clickNextStartButton(){if(startIndex<startButtons.length){const startButton=startButtons[startIndex];if(startButton.querySelector('.title')?.textContent.trim()==='Start'){console.log(`Clicking Start button ${startIndex+1}`);startButton.click();setTimeout(()=>{monitorAnimationUntilComplete(startIndex);startIndex++;setTimeout(clickNextStartButton,1500);},1000);}else{startIndex++;setTimeout(clickNextStartButton,300);}}}function monitorAnimationUntilComplete(animationIndex){let playAttempts=0;const maxAttempts=50;let lastPlayButtonCount=0;let sameCountCycles=0;function checkAndClickPlay(){playAttempts++;if(playAttempts>maxAttempts){console.log(`Animation ${animationIndex+1}: Max play attempts reached, moving on`);return;}const playButtons=document.querySelectorAll('button[aria-label="Play"]');let activePlayButtons=0;playButtons.forEach(button=>{const playButtonDiv=button.querySelector('.play-button');if(playButtonDiv&&!playButtonDiv.classList.contains('rotate-180')){activePlayButtons++;console.log(`Animation ${animationIndex+1}: Clicking active Play button (attempt ${playAttempts})`);button.click();setTimeout(()=>{const newPlayButtons=document.querySelectorAll('button[aria-label="Play"]');let needsMoreClicks=false;newPlayButtons.forEach(newButton=>{const newPlayDiv=newButton.querySelector('.play-button');if(newPlayDiv&&!newPlayDiv.classList.contains('rotate-180')){needsMoreClicks=true;}});if(needsMoreClicks){setTimeout(checkAndClickPlay,500);}},300);}});const completedButtons=document.querySelectorAll('.play-button.rotate-180');if(completedButtons.length>0){console.log(`Animation ${animationIndex+1}: Completed (rotate-180 detected)`);return;}if(activePlayButtons===0){if(playButtons.length===lastPlayButtonCount){sameCountCycles++;}else{sameCountCycles=0;lastPlayButtonCount=playButtons.length;}if(sameCountCycles>3||playButtons.length===0){const pauseButtons=document.querySelectorAll('button[aria-label="Pause"]');if(pauseButtons.length===0){console.log(`Animation ${animationIndex+1}: No active play buttons and no pause buttons, assuming completed`);return;}}setTimeout(checkAndClickPlay,800);}else{sameCountCycles=0;lastPlayButtonCount=0;}}setTimeout(checkAndClickPlay,1500);}function enhancedPlayButtonMonitoring(){const animations=document.querySelectorAll('.animation-container, [class*="animation"]');console.log(`Found ${animations.length} potential animation containers`);animations.forEach((animation,index)=>{setTimeout(()=>{monitorSingleAnimation(animation,index);},index*2000);});}function monitorSingleAnimation(container,index){let retryCount=0;const maxRetries=30;function checkAnimation(){retryCount++;const playButtons=document.querySelectorAll('button[aria-label="Play"]');let foundActive=false;playButtons.forEach(button=>{const playDiv=button.querySelector('.play-button');if(playDiv&&!playDiv.classList.contains('rotate-180')){foundActive=true;console.log(`Animation ${index+1}: Clicking play button (retry ${retryCount})`);button.click();setTimeout(checkAnimation,600);return;}});if(!foundActive){const completed=document.querySelectorAll('.play-button.rotate-180');if(completed.length>0||retryCount>=maxRetries){console.log(`Animation ${index+1}: Monitoring complete or max retries reached`);}else{setTimeout(checkAnimation,800);}}}setTimeout(checkAnimation,1000);}clickNextStartButton();setTimeout(enhancedPlayButtonMonitoring,3000);const radioButtons=document.querySelectorAll('input[type="radio"]');let radioIndex=0;function clickNextRadio(){if(radioIndex<radioButtons.length){radioButtons[radioIndex].click();radioIndex++;setTimeout(clickNextRadio,300);}}clickNextRadio();const x2Buttons=document.querySelectorAll('input[type="checkbox"]');let checkboxIndex=0;function clickNextCheckbox(){if(checkboxIndex<x2Buttons.length){x2Buttons[checkboxIndex].click();checkboxIndex++;setTimeout(clickNextCheckbox,300);}}clickNextCheckbox();function autoFillAnswers(){const questions=document.querySelectorAll('.question-set-question.short-answer-question');let questionIndex=0;function processNextQuestion(){if(questionIndex>=questions.length)return;const question=questions[questionIndex];const showAnswerBtn=question.querySelector('button.zb-button.secondary.show-answer-button');const answerSpan=question.querySelector('span.forfeit-answer');const input=question.querySelector('input.zb-input[type="text"]');const textarea=question.querySelector('textarea.zb-textarea');const checkBtn=question.querySelector('button.zb-button.primary.raised.check-button');if(showAnswerBtn&&(input||textarea)&&checkBtn){console.log(`Processing question ${questionIndex+1}`);showAnswerBtn.click();setTimeout(()=>{if(answerSpan){const answer=answerSpan.textContent.trim();console.log(`Found answer: ${answer}`);if(input){input.value=answer;input.dispatchEvent(new Event('input',{bubbles:true}));input.dispatchEvent(new Event('change',{bubbles:true}));console.log(`Filled input with answer`);}else if(textarea){textarea.value=answer;textarea.dispatchEvent(new Event('input',{bubbles:true}));textarea.dispatchEvent(new Event('change',{bubbles:true}));console.log(`Filled textarea with multi-line answer`);}setTimeout(()=>{checkBtn.click();console.log(`Checked answer for question ${questionIndex+1}`);questionIndex++;setTimeout(processNextQuestion,500);},300);}else{console.log(`No answer found for question ${questionIndex+1}, moving to next`);questionIndex++;setTimeout(processNextQuestion,300);}},500);}else{console.log(`Skipping question ${questionIndex+1} - missing required elements`);questionIndex++;setTimeout(processNextQuestion,300);}}processNextQuestion();}function clickShowAnswerButtonsAndAutoFill(){const showAnswerButtons=document.querySelectorAll('button.zb-button.secondary.show-answer-button');let answerIndex=0;function processNextAnswerButton(){if(answerIndex>=showAnswerButtons.length){setTimeout(autoFillAnswers,1000);return;}const button=showAnswerButtons[answerIndex];button.click();setTimeout(()=>{button.click();answerIndex++;setTimeout(processNextAnswerButton,300);},300);}processNextAnswerButton();}function handleTextareaQuestions(){const textareaQuestions=document.querySelectorAll('.short-answer-textarea-container');console.log(`Found ${textareaQuestions.length} textarea-based questions`);textareaQuestions.forEach((container,index)=>{const question=container.closest('.question-set-question');if(question){const showAnswerBtn=question.querySelector('button.zb-button.secondary.show-answer-button');const answerSpan=question.querySelector('span.forfeit-answer');const textarea=container.querySelector('textarea.zb-textarea');const checkBtn=question.querySelector('button.zb-button.primary.raised.check-button');if(showAnswerBtn&&textarea&&checkBtn){console.log(`Processing textarea question ${index+1}`);showAnswerBtn.click();setTimeout(()=>{if(answerSpan){const answer=answerSpan.textContent.trim();console.log(`Textarea answer: ${answer}`);textarea.value=answer;textarea.dispatchEvent(new Event('input',{bubbles:true}));textarea.dispatchEvent(new Event('change',{bubbles:true}));setTimeout(()=>{checkBtn.click();console.log(`Checked textarea question ${index+1}`);},300);}},500);}}});}clickShowAnswerButtonsAndAutoFill();setTimeout(handleTextareaQuestions,2000);})();