Você está lendo a versão em inglês deste conteúdo porque ainda não há uma tradução para este idioma. Ajude-nos a traduzir este artigo!
A BrowserSetting
object whose underlying value is a string.
Firefox enables the user to set their own colors for document backgrounds and text. By default these values are only applied when a high-contrast theme is selected (a high-contrast theme is a feature of some operating system UIs that increases the contrast for improved accessibility). However, users can also choose to apply these colors always or never. This browser setting exposes that preference.
Its underlying value is a string that may take any one of the following values:
- "high-contrast-only": Apply the user's choices only when a high-contrast theme is selected. This is the default.
- "never": Never apply the user's choices.
- "always": Always apply the user's choices.
Browser compatibility
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Desktop | Mobile | ||||
---|---|---|---|---|---|
openUrlbarResultsInNewTabs | Chrome No support No | Edge No support No | Firefox Full support 61 | Opera No support No | Firefox Android Full support 61 |
Legend
- Full support
- Full support
- No support
- No support
Examples
Set the setting to "always":
function logResult(result) { console.log(`Setting was modified: ${result}`); } browser.browserSettings.overrideDocumentColors.set({value: "always"}). then(logResult);