theme.reset()
Resets any theme applied using thetheme.update() method.
To use this method, an extension must request the "theme"permission in itsmanifest.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 (seebug 1415267).
In this article
Syntax
js
browser.theme.reset( windowId // integer)Parameters
windowIdOptionalinteger. 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();});