Plugin Object
Methods
- plugin.addFilter()
-
Add your own filter to the collection on the Decks and Crafting pages. On any other page
addFilterdoes 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.eventsis 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).