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
The code makes use of localStorage() to save the raw text and the time and date of when the edit has been made.
Given that localStorage only has 5MiB available to it, you might want to use the localForage library to have a localStorage-like API for IndexedDB, with automatic localForage fallback, so that people can store even larger notes, or you could even support storing pasted images as PNG blobs.
Alternatively, you might want to either compress the text with LZ-String before storing it. (BTW, version 2.0 is currently awaiting a merge and much faster, especially if you use the "Unsafe" version)
The text was updated successfully, but these errors were encountered:
A better option that doesn't require any external dependencies is to use the unlimitedStorage permission which just uses the same API but doesn't limit the storage. in addition the storage being used currently is the window.localStorage api that is ephemeral and will be lost when someone clears their browser history. This will make someone angry I guarantee it. The chrome.localStorage API is asynchronous though so it will require a touch of changes. if you want to use promises and async/await there is a browser polyfill that ports the firefox promise based browser webExt apis to chrome.
Given that
localStorage
only has 5MiB available to it, you might want to use the localForage library to have a localStorage-like API for IndexedDB, with automatic localForage fallback, so that people can store even larger notes, or you could even support storing pasted images as PNG blobs.Alternatively, you might want to either compress the text with LZ-String before storing it. (BTW, version 2.0 is currently awaiting a merge and much faster, especially if you use the "Unsafe" version)
The text was updated successfully, but these errors were encountered: