Kahoot Auto Answer

Auto-answer Kahoot questions with random answers

  1. // ==UserScript==
  2. // @name Kahoot Auto Answer
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Auto-answer Kahoot questions with random answers
  6. // @author You
  7. // @match https://kahoot.it/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // Function to simulate a random click on one of the answers
  15. function autoAnswer() {
  16. // Check if the answers are available
  17. const answerButtons = document.querySelectorAll('.mcq-answer'); // for multiple-choice answers
  18. if (answerButtons.length > 0) {
  19. // Pick a random answer (0 - number of available answers)
  20. const randomAnswerIndex = Math.floor(Math.random() * answerButtons.length);
  21. const selectedAnswer = answerButtons[randomAnswerIndex];
  22. // Click the random answer
  23. selectedAnswer.click();
  24. }
  25. }
  26.  
  27. // Run the function when the page has loaded
  28. window.addEventListener('load', function() {
  29. setInterval(autoAnswer, 1000); // Check for answers every second and automatically select one
  30. });
  31. })();