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
ayoung19
changed the title
popup: display how much storage the clipboard history list takes
popup: display how much storage the clipboard history list is using
Sep 26, 2024
Did some initial digging on this one, one issue I'm seeing is that browser.storage.local.getBytesInUseisn't supported for Firefox.
For Chrome, it's doable via the way you mentioned, but do we want to introduce browser-specific functionality?
Another (janky?) option would be something that uses Plasmo's storage object:
async function getStorageUsage() {
const allData = await storage.getAll();
return new Blob([JSON.stringify(allData)]).size;
}
but not sure we want that running all the time. Keeping it in the Storage tab might be the best way to go to keep the compute load down... lmk your thoughts @ayoung19 🙂
https://developer.chrome.com/docs/extensions/reference/api/storage#type-StorageArea
onChanged
andgetBytesInUse
will be helpful here.UI Ideas:
Add it to the main page like Copy History + does:
Add it in an "About" tab in the Settings modal. Could even add version history to this as well.
The text was updated successfully, but these errors were encountered: