Find & Save Editorial, Copy problem as Markdown or Download as Jupyter Notebook, Format on Save, Unlock IntelliSense, Display Problem Ratings and more.
Ajankohdalta
https://github.com/eclipher/Userscripts/blob/main/userscripts/leetcode-toolkit/README.md
This userscript enhances the LeetCode with various tweaking and additions. It supports both the US version of LeetCode.com, and the China version.
On Description Tab:
.ipynb file. See About Jupyter Notebook section for more detail.On Editorial Tab:
.md file. See About Editorial Scraping section for more detail.The code editor receives some quality-of-life adjustments:
(*) These features are for US site only.
(**) This feature relies on Tampermonkey's window.onurlchange API. If you're using a different userscript manager that doesn't support this API, the rating may not update correctly when you navigate between problems without a full page reload.
LeetCode editorial articles contains codes, slides, videos, math expressions and so on. You can use any Markdown readers to view the scraped .md files, but I developed a dedicated LeetCode Editorial Reader app to view them in best layout.
A few things to notice:
Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations, and narrative text.
The Save as Jupyter Notebook feature helps you transfer LeetCode problems into a Jupyter Notebook document, so you can read the problem, write and run the solution, add additional notes, all at one place on your local machine.
You can open .ipynb notebooks with clients such as VS Code. By default it supports Python, but kernels for many other languages are available too.
To use this userscript, you'll need a userscript manager like Tampermonkey (available for Chrome, Firefox, and other browsers).
This script is inspired by the following projects:
MIT License