This section is currently being written and will be updated frequently.
Important: only the API from window.editorAPI is considered stable and officially supported.
The window.editor object is available for exploration and experimentation, but its structure may change without notice and compatibility between versions is not guaranteed.
A typical plugin consists of two parts:
A metadata header in the UserScript comment format.
Plugin code, usually wrapped in an IIFE (an immediately invoked function expression) to avoid polluting the global scope.
Example:
// ==UserScript==
// @name Test plugin
// @namespace example-illystray
// @description A test plugin that does nothing
// @logo_url https://bdecdn.com/icon/icon-192x192.png
// @author illystray
// ==/UserScript==
Required fields:
@name - A human-readable name of the plugin. Displayed in the interface.
@namespace - A unique identifier of the plugin. Used to determine updates/replacements.
Optional fields:
@description - A brief description of what the plugin does.
@logo_url - The URL of the plugin’s logo/icon. An image or SVG.
@author - The name/nickname of the author.
Recommended template:
(() => {
const log = (...args) => console.log('[Plugin name]', ...args);
// Your code here
})();
Recommended template: