User scripts (a.k.a. Greasemonkey scripts) are small computer programs that change the layout of a page, add or remove new functionality and content, or automate actions within modern browsers, such as Chrome.
This approach is called as monkey patching, so the tools in which user scripts run are often named with the word "monkey".
- Install user script manager, such as Tampermonkey or Violentmonkey.
- Open installation page
- Select "Install from URL"
- Type in the raw url of a
.user.js
file here - Enable auto update, if it's not default
AcWing is an Online Judge (OJ) for OIers.
This piece of user script is to help user to print the question page with a neat layout, or save a copy of the question in Markdown format.
- After the menu item of Prepare to print is clicked, it removes all unnecessary elements and append a date to the top right corner of the page. So you will get a printer-friendly AcWing question page, which you can go directly to print it with your favorite browser.
- After the menu item of Show Markdown is clicked, it create a text box for the raw string in Markdown format, and automatically copies it to your clipboard.
https://github.com/hanson2010/user-script/raw/main/AcWing-Helper.user.js
- v1.2
- Add prefix
ACW
- Add prefix
- v1.1
- Remove two more buttons
- v1.0
- Prepare to print
- Show Markdown
Luogu is an Online Judge (OJ) for OIers.
This piece of user script is to help user to print the question page with a neat layout.
- It shows CodeForces difficulty if the problem comes from CodeForces.
- After the menu item of Prepare to print is clicked, it removes all unnecessary elements and append a date to the top right corner of the page. So you will get a printer-friendly Luogu question page, which you can go directly to print it with your favorite browser.
- After the menu item of Purge cache is clicked, it purges outdated difficulty values from cache.
https://github.com/hanson2010/user-script/raw/main/Luogu-Helper.user.js
- v1.0
- Initial version
CodeForces is an Online Judge (OJ) for OIers.
This piece of user script is to help user to print the question page with a neat layout.
After the menu item of Prepare to print is clicked, it removes all unnecessary elements and append a date to the top right corner of the page. So you will get a printer-friendly CodeForces question page, which you can go directly to print it with your favorite browser.
https://github.com/hanson2010/user-script/raw/main/CodeForces-Helper.user.js
- v1.0
- Initial version
This user script add buttons to show source text for Markdown-rendered webpages.
https://github.com/hanson2010/user-script/raw/main/Show-Markdown.user.js
- v1.1
- Support more websites
- v1.0
This user script removes all irrelevant elements, such as advertisements and buttons, with the piece of news you are browsing.
https://github.com/hanson2010/user-script/raw/main/Printer-friendly-Taiwan-Media.user.js
User script is licensed under the MIT License.