FirefoxBar / xStyle

A user styles manager for Firefox and Chrome
http://team.firefoxcn.net/#addons
GNU General Public License v3.0
171 stars 13 forks source link

Use storage.local instead of window.localStorage for styles storage #67

Open yfdyh000 opened 5 years ago

yfdyh000 commented 5 years ago

I noticed the styles was lost if I removed the webappsstore.sqlite file for some purpose. e.g. it is too large and I need to rebuild it.

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage/local Although this API is similar to Window.localStorage it is recommended that you don't use Window.localStorage in extension code. Firefox will clear data stored by extensions using the localStorage API in various scenarios where users clear their browsing history and data for privacy reasons, while data saved using the storage.local API will be correctly persisted in these scenarios.