From 1d8a18aa1ef818dbe360277fee51189abff9bf38 Mon Sep 17 00:00:00 2001 From: rebloor Date: Mon, 9 Sep 2024 16:26:27 +1200 Subject: [PATCH] Automatic theme switching support in favorite colours (#567) * Automatic theme switching support in favorite colours * Ref to dark theme Co-authored-by: Rob Wu --------- Co-authored-by: Rob Wu --- favourite-colour/README.md | 10 +++++----- favourite-colour/options.html | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/favourite-colour/README.md b/favourite-colour/README.md index 820fc08..e0cc781 100644 --- a/favourite-colour/README.md +++ b/favourite-colour/README.md @@ -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", diff --git a/favourite-colour/options.html b/favourite-colour/options.html index 6b11728..604761a 100644 --- a/favourite-colour/options.html +++ b/favourite-colour/options.html @@ -3,6 +3,7 @@ +