theme.reset()

Resets any theme applied using the theme.update() method.

To use this method, an extension must request the "theme" permission in its manifest.json file.

Note that this always reset the theme back to the original default theme, even if the user selected a different theme before this extension's theme was applied (see bug 1415267).

Syntax

js
browser.theme.reset(
  windowId     // integer
)

Parameters

windowId Optional

integer. The ID of a window. If this is provided, the theme applied to that window is reset. If it is omitted, the theme is reset on all windows.

Examples

This code applies a theme, then removes it when the user clicks a browser action:

js
browser.theme.update(themes.night);

browser.browserAction.onClicked.addListener(() => {
  browser.theme.reset();
});

Example extensions

Browser compatibility

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
reset
windowId

Legend

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

Full support
Full support
No support
No support