Skip to content

Latest commit

 

History

History
115 lines (71 loc) · 3.92 KB

File metadata and controls

115 lines (71 loc) · 3.92 KB

User script

Getting started

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

  • 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

The collection

AcWing Helper

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.

The URL

https://github.com/hanson2010/user-script/raw/main/AcWing-Helper.user.js

Changelog

  • v1.2
    • Add prefix ACW
  • v1.1
    • Remove two more buttons
  • v1.0
    • Prepare to print
    • Show Markdown

Luogu Helper

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.

The URL

https://github.com/hanson2010/user-script/raw/main/Luogu-Helper.user.js

Changelog

  • v1.0
    • Initial version

CodeForces Helper

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.

The URL

https://github.com/hanson2010/user-script/raw/main/CodeForces-Helper.user.js

Changelog

  • v1.0
    • Initial version

Show Markdown

This user script add buttons to show source text for Markdown-rendered webpages.

The URL

https://github.com/hanson2010/user-script/raw/main/Show-Markdown.user.js

Changelog

Printer-friendly Taiwan Media

This user script removes all irrelevant elements, such as advertisements and buttons, with the piece of news you are browsing.

The URL

https://github.com/hanson2010/user-script/raw/main/Printer-friendly-Taiwan-Media.user.js

Changelog

License

User script is licensed under the MIT License.