Udemy Course Checkbox Automation Script

Automate expanding Udemy course sections and checking lesson completion with this simple JavaScript script.


Udemy Course Checkbox Automation Script Blog

This blog post provides a JavaScript automation script designed to simplify the process of expanding all course sections and checking lesson completion checkboxes on Udemy. By running this script in the browser's developer console, users can easily mark their progress across multiple lessons and expand all course content with a single command. The post includes step-by-step instructions for using the script, making it an essential tool for Udemy course takers looking to streamline their learning experience.

Table of Contents

Features

  • Expand Course Sections: Automatically clicks and expands all course sections that may be collapsed.
  • Checkbox Automation: Automatically checks all lesson completion checkboxes within a course.

How to Use

Follow the steps below to use this script on any Udemy course page.

Step 1: Open Udemy Course Page

Go to the Udemy course page where you want to expand all sections and check all lesson completion checkboxes.

Step 2: Open the Browser Console

  1. Right-click anywhere on the Udemy page.
  2. Select Inspect from the dropdown menu.
  3. In the Developer Tools window, navigate to the Console tab.

Step 3: Copy and Paste the Script

Copy the following script and paste it directly into the console:

// Step 1: Expand all sections by clicking the expand icon
document.querySelectorAll('.accordion-panel-module--expand-icon--knJ5Q').forEach(icon => {
    // Use the parent element or dispatch a mouse event to simulate a click
    const event = new MouseEvent('click', {
        view: window,
        bubbles: true,
        cancelable: true
    });
    icon.dispatchEvent(event);  // Dispatch click event
});
 
// Step 2: Check all checkboxes by clicking the checkbox elements
document.querySelectorAll('.ud-fake-toggle-input.ud-fake-toggle-checkbox').forEach(checkbox => {
    // Simulate a click event for each checkbox
    const event = new MouseEvent('click', {
        view: window,
        bubbles: true,
        cancelable: true
    });
    checkbox.dispatchEvent(event);  // Dispatch click event
});

Step 4: Run the Script

Once you paste the script in the console, press Enter to run it.
The script will:

  • Automatically expand all sections of the course.
  • Automatically check all the lesson completion checkboxes.

Contributing

If you would like to contribute to this project, you can follow these steps:

  1. Fork the repository .
  2. Make your changes.
  3. Create a pull request with a detailed explanation of your changes.