glide.addons API allows you to programmatically install and manage browser extensions (addons) from your Glide configuration.
Methods
glide.addons.install()
Install a browser extension from an XPI URL.Parameters
URL pointing to an XPI file for the extension you want to install
Optional configuration object
Returns
Returns aPromise<AddonInstall> object with the following properties:
id: string - Unique addon identifiername: string - Display name of the addondescription: string - Addon descriptionversion: string - Addon version numberactive: boolean - Whether the addon is currently activesource_uri: URL | null - Original installation URLprivate_browsing_allowed: boolean - Whether private browsing is enabledtype: AddonType - Type of addon (“extension”, “theme”, “locale”, etc.)cached: boolean - Whether this install was cached (addon was already installed)uninstall(): Promise<void> - Uninstall the addonreload(): Promise<void> - Reload the addon
Examples
Basic installation Install uBlock Origin from addons.mozilla.org:- Navigate to the extension’s page (e.g., https://addons.mozilla.org/firefox/addon/ublock-origin/)
- Right-click the “Add to Firefox” button
- Select “Copy Link”
- Paste the URL into your config
glide.addons.list()
List all installed addons, optionally filtered by type.Parameters
Optional filter for addon types. Can be a single type or array of types:
"extension"- Browser extensions"theme"- Browser themes"locale"- Language packs"dictionary"- Spell-check dictionaries"sitepermission"- Site-specific permissions
Returns
Returns aPromise<Addon[]> - array of addon objects. Each addon has the same properties as AddonInstall except without the cached property.
Examples
List all addonsComplete Example
Automatic addon management in your config:Notes
- Addon installations are cached between config reloads. If an addon is already installed,
glide.addons.install()returns the existing addon unlessforce: trueis specified. - Installed addons persist across browser restarts and config reloads.
- To remove an addon, you must call the
uninstall()method on the addon object. - The
reload()method is useful for development when you’re updating an extension.