From f7c8862703575e3383ffa19f30cd0affd189f197 Mon Sep 17 00:00:00 2001 From: Andy McKay Date: Thu, 27 Apr 2017 09:19:49 -0700 Subject: [PATCH] show how to persist data between restarts (#209) --- quicknote/README.md | 11 +++++++++-- quicknote/manifest.json | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/quicknote/README.md b/quicknote/README.md index 76de021..3d66bba 100644 --- a/quicknote/README.md +++ b/quicknote/README.md @@ -1,7 +1,14 @@ # Quicknote + A persistent note/to-do list application — click a button in your browser and record notes, which will persist even after browser restarts. -Works in Firefox 47+, and will also work as a Chrome extension, out of the box. +Works in Firefox 47+. + +## Running with web-ext + +[web-ext](https://developer.mozilla.org/en-US/Add-ons/WebExtensions) generates a new profile on each run, meaning your data is not persisted between Firefox runs. To use web-ext and preserve this information, you will need an existing or new Firefox profile. Then run: + +web-ext run --firefox-profile [A PATH TO A FIREFOX PROFILE] --keep-profile-changes ## What it does @@ -12,7 +19,7 @@ This extension includes: * A list of the notes that have been added to the extension — each note includes a delete button to delete just that note. You can also click on the note title and body to edit them. In edit mode, each note includes: * An update button to submit an update. * A cancel button to cancel the update. - + Quicknote uses the WebExtensions [Storage API](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/storage) to persist the notes. ## What it shows diff --git a/quicknote/manifest.json b/quicknote/manifest.json index 6134678..ba5f2e5 100644 --- a/quicknote/manifest.json +++ b/quicknote/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "Quicknote", - "version": "1.0", + "version": "1.1", "description": "Allows the user to make quick notes by clicking a button and entering text into the resulting popup. The notes are saved in storage. See https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Examples#quicknote", "icons": { @@ -11,7 +11,7 @@ "permissions": [ "storage" - ], + ], "browser_action": { "default_icon": { @@ -19,5 +19,12 @@ }, "default_title": "Quicknote", "default_popup": "popup/quicknote.html" + }, + + "applications": { + "gecko": { + "id": "quicknote-example@mozilla.org" + } } + }