/PSCP-y1

Primary LanguagePython

PSCP y1 (2024)

Rule

สำหรับใครที่ทำการ clone ไปแล้วอย่าลืมกด Follow Github ด้วยครับจะได้มีกำลังใจทำในรายวิชาต่อๆไปขอบคุณครับ 🤓

Template Docstring

"""
Description

Args:
    None

Returns:
    None
"""

สำหรับใครขี้เกียจทำ Exercise สามารถใช้สิ่งนี้ได้

  • กด F12 เพื่อเข้าไปที่ Console
  • กด Enter เพื่อรันโค้ด
(async () => {
    while (true) {
        const solutionButton = document.querySelector('.dcl__Button-module__button--R8ZjR.dcl__Button-module__inverted--1bxix.dcl__Button-module__small--1VJc5');
        if (solutionButton) {
            solutionButton.click();
        }

        await new Promise(resolve => setTimeout(resolve, 1000));
        const submitButton = document.querySelector('.dcl__Button-module__button--R8ZjR.dcl__Button-module__primary--2SH7R.dcl__Button-module__small--1VJc5');
        if (submitButton) {
            submitButton.click();
        }

        await new Promise(resolve => setTimeout(resolve, 1000));
        const nextQuestionLink = document.querySelector('a[href^="/exercises/"]');
        if (nextQuestionLink) {
            window.location.href = nextQuestionLink.href;
        } else {
            console.log("No next question link found. Stopping the loop.");
            break;
        }
    }
})();

Help !!!

สำหรับใครที่เห็นโค้ดแล้วต้องการให้ Refactor ข้อไหนหรืออยากให้เขียน comment อธิบาย Algorithm สามารถทักมาในช่องทางการติดต่อได้เลยถ้าว่างเดี๋ยวมาทำให้ครับ 🙇‍♂️ (ในหนึ่งขออาจจะทำได้หลายวิธีถ้ามีวิธีที่ดีและเร็วสามารถบอกได้เช่นกัน ขอบคุณล่วงหน้าครับ)

Contact

  • Github : Makufff
  • Instragram : _.makufff.js
  • Linkedin : Tanapat Chamted