← 返回首页
userScripts.unregister() - Mozilla | MDN

userScripts.unregister()

Unregisters user scripts registered by the extension.

In this article

Syntax

js
let unregisteringUserScripts = browser.userScripts.unregister( filter // optional object );

Parameters

filter Optional

userScripts.UserScriptFilter. A list of user script IDs to unregister. If not specified, all user scripts are unregistered.

Return value

A Promise fulfilled with no arguments if the user scripts are unregistered. If the request fails, the promise is rejected with an error message.

Example extensions

Browser compatibility

Enable JavaScript to view this browser compatibility table.