Skip to content

Instantly share code, notes, and snippets.

@AstralJohn
Last active June 29, 2026 14:34
Show Gist options
  • Select an option

  • Save AstralJohn/330df494981ca97c92a95b65e28967d3 to your computer and use it in GitHub Desktop.

Select an option

Save AstralJohn/330df494981ca97c92a95b65e28967d3 to your computer and use it in GitHub Desktop.
Reset Udemy Progress

Reset Udemy Progress

Last Updated: 06/18/2024

Step 1. Go to the Udemy course in your browser

Go to the course and have any video up. The following code relies on the right sidebar to be visible to uncheck all your progress.

Step 2. Open browser console

You can do this with ctrl+shift+j and making sure the console tab is selected for chrome/brave

For FireFox, use ctrl+shift+k you might need to type in "allow pasting" if it is your first time pasting in JS code in the console, the console will give you instructions on this if so.

Step 3. Run code in browser console

Copy and paste this code in the console Hit the enter key to run

// Expands all sections to make every checkbox visible
const sectionEl = document.querySelectorAll("span[data-checked=''] + div");
sectionEl.forEach((section) => {
	section.click()
});

// Unchecks all checkboxes
const checkboxes = document.querySelectorAll("input[type='checkbox']");
checkboxes.forEach((checkbox) => {
  if(checkbox.checked) {
    checkbox.click();
  }
})

Note that your Udemy progress % might not say 0% right away, this is on Udemy's end, but the % should update as you go through the course again.

Thank you for taking the time to read through this, if you have any problems please leave a comment. To show your appreciation, gift me a coffee ☺ https://ko-fi.com/johndinhdev

@somnathdas2008

Copy link
Copy Markdown

Not Working Error below

Uncaught TypeError: null has no properties
setAriaLabelforButtonInFilter https://cdn.cookielaw.org/scripttemplates/202211.2.0/otBannerSdk.js:7
toggleV2Category https://cdn.cookielaw.org/scripttemplates/202211.2.0/otBannerSdk.js:7
toggleGroupORVendorHandler https://cdn.cookielaw.org/scripttemplates/202211.2.0/otBannerSdk.js:7
debugger eval code:12
debugger eval code:10
2 otBannerSdk.js:7:321773
setAriaLabelforButtonInFilter https://cdn.cookielaw.org/scripttemplates/202211.2.0/otBannerSdk.js:7
toggleV2Category https://cdn.cookielaw.org/scripttemplates/202211.2.0/otBannerSdk.js:7
self-hosted:1356
toggleGroupORVendorHandler https://cdn.cookielaw.org/scripttemplates/202211.2.0/otBannerSdk.js:7
debugger eval code:12
forEach self-hosted:203
debugger eval code:10
getEvalResult resource://devtools/server/actors/webconsole/eval-with-debugger.js:242
evalWithDebugger resource://devtools/server/actors/webconsole/eval-with-debugger.js:166
evaluateJS resource://devtools/server/actors/webconsole.js:1131
evaluateJSAsync resource://devtools/server/actors/webconsole.js:1022
makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103

@SandorGyorgy

Copy link
Copy Markdown

Expand all sections by hand and run this :
const sectionEl = document.querySelector("section[data-purpose='sidebar']"); const checkboxes = sectionEl.querySelectorAll("input[type='checkbox']"); checkboxes.forEach((checkbox) => { if (checkbox.checked) { checkbox.disabled = false; checkbox.click(); } });

@somnathdas2008

Copy link
Copy Markdown

Awesome It works. Thank you so much. @SandorGyorgy

@akaluzinski

Copy link
Copy Markdown

Thanks guys! It's real time saver!

@Meenakshi-Dangi

Copy link
Copy Markdown

Thank you so much.
I am new to programming and finding it fascinating..... :-)
Programming can do miracles...!

@irfanbaigse

irfanbaigse commented Dec 13, 2023

Copy link
Copy Markdown

Working

Expand all sections

const checkboxes = document.querySelectorAll("input[type='checkbox']");
checkboxes.forEach((checkbox) => {
if(checkbox.checked) {
checkbox.click();}})

Mark as Complete

const sectionEl = document.querySelector("section[data-purpose='sidebar']"); const checkboxes = sectionEl.querySelectorAll("input[type='checkbox']"); checkboxes.forEach((checkbox) => { if (!checkbox.checked) { checkbox.disabled = false; checkbox.click(); } });

@israelclucena

israelclucena commented Jan 21, 2024

Copy link
Copy Markdown

const sectionEl = document.querySelector("section[data-purpose='sidebar']"); const checkboxes = sectionEl.querySelectorAll("input[type='checkbox']"); checkboxes.forEach((checkbox) => { if (checkbox.checked) { checkbox.disabled = false; checkbox.click(); } });

It works for me!

However, please be mindful to expand all sections before running the script.

@kavehtehrani

Copy link
Copy Markdown

Working

Expand all sections

const checkboxes = document.querySelectorAll("input[type='checkbox']");
checkboxes.forEach((checkbox) => {
if(checkbox.checked) {
checkbox.click();}})

Mark as Complete

const sectionEl = document.querySelector("section[data-purpose='sidebar']"); const checkboxes = sectionEl.querySelectorAll("input[type='checkbox']"); checkboxes.forEach((checkbox) => { if (!checkbox.checked) { checkbox.disabled = false; checkbox.click(); } });

Awesome thank you.

@ekrishnas

Copy link
Copy Markdown

Awesome thank you.

@596050

596050 commented Apr 14, 2024

Copy link
Copy Markdown

To open all sections:

$x("/html/body/div[1]/div[1]/div/div/main/div/div[2]/section/div[2]/div/div/div/div[1]").map(el => el.click())

To uncheck all checkboxes:

const checkboxes = document.querySelectorAll("input[type='checkbox']");
checkboxes.forEach((checkbox) => {
if(checkbox.checked) {
checkbox.click();}})

@khanshadab007

Copy link
Copy Markdown

console.log("Thank you");

@ChristiaanGitHubber

Copy link
Copy Markdown

September 7th 2024
Worked for me ty :)

@Shramkoweb

Copy link
Copy Markdown

You can also use this Extension: https://shramko.dev/udemy-reset-progress

It’s my open-source project, so it’s totally safe and always works great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment