Documentation for JS plugins for BDEngine

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.

Structure of a JS Plugin

Desc

A typical plugin consists of two parts:

  1. A metadata header in the UserScript comment format.

  2. Plugin code, usually wrapped in an IIFE (an immediately invoked function expression) to avoid polluting the global scope.

Plugin Header (Metadata)

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.

Plugin Entry Point

Recommended template:

(() => {
    const log = (...args) => console.log('[Plugin name]', ...args);

    // Your code here
})();

Recommended template:

Sign up to create and share content. Sign up
Dashboard
Chats
Sign In
Browse