Skip to content

ylz-at/leetcode-remove-premium-problems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to remove leetcode premium problems from your problem list

For PROs

var x = document.getElementsByTagName("tr");
var sum = x.length;
for (let i = 0; i < x.length; i++) {
    if (x[i]["cells"][2]) {
        if (x[i]["cells"][2].firstElementChild.getElementsByTagName("span")[1]) {
            if (x[i]["cells"][2].firstElementChild.getElementsByTagName("span")[1].attributes[3].value === "Subscribe to unlock") {
                x[i].hidden=true
                sum--
            }
        }
    }
}
console.log(sum)

For newbees, step by step

before

  • Press F12 to open browser dev tools -> Console

use code

  • Ctrl+C the javascript code above and Ctrl+V to the console then press Enter
  • Check the result, all the locked/premium problems disappeared

    Tip: those premium problems will show up again if you refresh the page, so you'd better Open link in a new TAB.

after

About

Remove leetcode premium problems from your problem list

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published