Automatic theme switching support in favorite colours (#567)

* Automatic theme switching support in favorite colours

* Ref to dark theme

Co-authored-by: Rob Wu <rob@robwu.nl>

---------

Co-authored-by: Rob Wu <rob@robwu.nl>
This commit is contained in:
rebloor
2024-09-09 16:26:27 +12:00
committed by GitHub
parent 141134499a
commit 1d8a18aa1e
2 changed files with 6 additions and 5 deletions

View File

@@ -1,15 +1,15 @@
# Favourite Colour
Shows and stores your favourite colour, in storage.sync in the about:addons page for the add-on.
Shows and stores your favourite colour, in storage.sync in the extension's about:addons page.
Demonstrates:
* storing data with storage.sync
* reading data from storage.managed
* creating an options page and opening it with `runtime.openOptionsPage()`
* best practice for supporting automatic theme switching (dark theme) in the options page
* reading data from storage.managed,
* creating an options page and opening it with `runtime.openOptionsPage()`.
To have Firefox read data from storage.managed, create a file with the following contents:
To have Firefox read data from storage.managed, create a file with this content:
{
"name": "favourite-colour-examples@mozilla.org",

View File

@@ -3,6 +3,7 @@
<html>
<head>
<meta charset="utf-8">
<meta name="color-scheme" content="dark light">
</head>
<body>