Diamondcrusher

IXL math answer bot

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.gf.qytechs.cn/scripts/506689/1440824/Diamondcrusher.js

  1. /**
  2. * This is a Tampermonkey script that serves as an auto-answer bot for IXL Math.
  3. * It automatically answers questions in the IXL Math practice by tampering with the DOM.
  4. */
  5. /**
  6. * Function to simulate a click event on an element.
  7. *
  8. * @param {HTMLElement} element - The element to click.
  9. */
  10. function simulateClick(element) {
  11. const event = new MouseEvent('click', {
  12. bubbles: true,
  13. cancelable: true,
  14. view: window
  15. });
  16. element.dispatchEvent(event);
  17. }
  18. /**
  19. * Function to automatically answer IXL Math questions.
  20. */
  21. function autoAnswer() {
  22. // Get the question element
  23. const questionElement = document.querySelector('.question');
  24. // Get the answer choices
  25. const answerChoices = questionElement.querySelectorAll('.answer-choice');
  26. // Choose the first answer choice
  27. const answerChoice = answerChoices[0];
  28. // Simulate a click on the answer choice
  29. simulateClick(answerChoice);
  30. }
  31. // Call the autoAnswer function to start auto-answering questions
  32. autoAnswer();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址