userScripts.getScripts()

Returns user scripts registered by the extension.

Syntax

js
const gettingUserScripts = await browser.userScripts.getScripts(
  filter       // object
);

Parameters

filter Optional

userScripts.UserScriptFilter. A list of user script IDs to return.

Return value

A Promise fulfilled with an array of userScripts.RegisteredUserScript objects. If no matching user scripts are found, the array is empty. If the request fails, the promise is rejected with an error message.

Example extensions

Browser compatibility

BCD tables only load in the browser