underscript.plugin()

by feildmaster (October 11, 2026)

The Plugin API is a service made to allow elevated access to UnderScript’s internals.

Syntax

underscript.plugin(name, version);

name
Name of plugin (See name restrictions)
version
Version of your plugin, optional. A plugin with a version can use plugin.updater().
Return Value
Returns Plugin object

Methods

plugin.addFilter()

Add your own filter to the collection on the Decks and Crafting pages. On any other page addFilter does not exist, so check for it first.

plugin.addStyle()

Add CSS to the document.

plugin.settings()

Provides access to the settings API. Your plugin gets its own page in the UnderScript settings window, under Plugins.

plugin.toast()

Allow plugins to send toasts. A toast is a small message in the corner of the page. The footer shows the name of your plugin.

plugin.updater()

Let UnderScript check your plugin for updates. When a newer version is found, the user is told and can install it from the Pending Updates window.

Properties

plugin.events

Listen to and emit events. plugin.events is UnderScript’s EventEmitter, so events you emit can be heard by other plugins. Errors thrown by your listeners are caught and written to your plugin’s logger instead of breaking other listeners.

plugin.hotkey

Register hotkeys: keys and mouse buttons that run your code.

plugin.logger

The logger writes to the console, prefixed with the name of your plugin.

plugin.name

Output the name of the plugin.

plugin.quests

Look up the user’s quests.

plugin.version

The version of your plugin. Only exists when you passed one to underscript.plugin(name, version).

Restrictions

Plugin names have the following restrictions:

  1. No two plugins may share the same name
  2. Plugin names cant be longer than 20 characters
  3. Plugin names can only contain alphanumeric characters and space (A-Z0-9 )

Any plugin names outside these bounds will trigger an error and not create a plugin