You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ Main features:
7
7
- Define your default options
8
8
- Add autoload and autosave to your options `<form>`
9
9
- Run migrations on update
10
+
- Import/export helpers
10
11
11
12
This also lets you very easily have [separate options for each domain](https://github.com/fregante/webext-options-sync-per-domain) with the help of `webext-options-sync-per-domain`.
12
13
@@ -283,6 +284,11 @@ This returns a Promise that will resolve with all the options.
283
284
284
285
Any defaults or saved options will be loaded into the `<form>` and any change will automatically be saved via `chrome.storage.sync`. It also looks for any buttons with `js-import` or `js-export` classes that when clicked will allow the user to export and import the options to a JSON file.
285
286
287
+
-`options-sync:save-success`: Fired on the edited field when the form is saved.
288
+
-`options-sync:save-error`: Fired on the edited field when the form is not saved due to an error. The error is passed as the `detail` property.
289
+
290
+
Saving can fail when the storage quota is exceeded for example. You should handle this case and display a message to the user.
291
+
286
292
##### form
287
293
288
294
Type: `HTMLFormElement`, `string`
@@ -308,7 +314,3 @@ Opens the browser’s file picker to import options from a previously-saved JSON
308
314
-[webext-dynamic-content-scripts](https://github.com/fregante/webext-dynamic-content-scripts) - Automatically registers your content_scripts on domains added via permission.request.
309
315
-[Awesome-WebExtensions](https://github.com/fregante/Awesome-WebExtensions) - A curated list of awesome resources for WebExtensions development.
0 commit comments