1

I want to store data (increasing everytime the extension is "triggered") in a json file to display it for the user. I can't find a solution on how to add a json file where I can store and overwrite data.

Reconnact
  • 23
  • 1
  • 4

1 Answers1

1

To store persistent data between between uses, you'll need to use the "storage" API which you can read about here.

Basically, you'll want to include the storage API in your manifest, then call it with methods like let gettingAllStorageItems = browser.storage.local.get(null);. Here's an example.

old_dd
  • 135
  • 2
  • 13