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

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
getScripts
Chrome – Full support
Chrome 120 (Release date: 2023-12-05)
footnote Full support
Edge – Full support
Edge 120 (Release date: 2023-12-07)
footnote Full support
Firefox – Full support
Firefox 136 (Release date: 2025-03-04)
footnote Full support
Opera – Full support
Opera 106 (Release date: 2023-12-19)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – Full support
Firefox for Android 138 (Release date: 2025-04-29)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support