Userscript manager

A userscript manager, also known as a userscript engine, is a type of browser extension and augmented browsing technology that provides a user interface to run and organize userscripts. The main purpose of a userscript manager is to execute scripts on predetermined webpages as they are loaded, for example, running a userscript to modify only youtube.com pages. But, userscript managers do a lot more than execute scripts, and screen for the pages they are intended to run on. The most common operations performed by a userscript manager include installing, organizing, creating, copying, saving, deleting, and editing (including modifying webpage permissions of) userscripts.[1]

Userscript managers use metadata that is embedded in a script's source code primarily to determine the websites it should execute on and the dependencies necessary for the script to run properly. Metadata can also include information that is useful to the user such as the script's name, author, description and version number.

Popular userscript managers include Tampermonkey, Greasemonkey, and Violentmonkey. The Gear browser for IOS has a userscript manager built in.

Functions

[edit]

A userscript is a computer program (written in JavaScript) containing metadata intended for use by a userscript manager. The metadata contains specific delimiters which help the userscript manager distinguish it from ordinary JavaScript files, along with configuration parameters used during installation.

Typical functions of a userscript manager include:

  • Downloading, installing, and storing userscripts
  • Calling userscripts
    • Every time any webpage is opened, all the userscripts are scanned to see if their permissions match the page's URL, or any piece thereof, and the userscripts that match are run, enabling them to in turn process the content of the page, such as modify the way it looks, or add features to the page.
  • Downloading dependencies (e.g. third-party libraries, images) during the execution of a userscript
  • Creating and editing userscripts
  • Saving userscripts to disk
  • Providing automatic updates

See also

[edit]

References

[edit]
  1. ^ "Greasy Fork - safe and useful user scripts". greasyfork.org. Retrieved 2024-04-26.
[edit]