Save program state in chrome extension between uses

前端 未结 2 1428
耶瑟儿~
耶瑟儿~ 2021-01-25 02:04

I have a chrome extension that does spell check. I want to implement the feature to \'add a word to dictionary\' but I read that chrome extension api does not allow reading and

相关标签:
2条回答
  • 2021-01-25 02:36

    As Josh mentioned, use the chrome storage API. For example chrome.storage.sync.set() and chrome.storage.sync.get() automatically syncs the saved data between the different devices the user uses - it's very nice both for developers and users.

    http://developer.chrome.com/extensions/storage.html

    0 讨论(0)
  • 2021-01-25 02:39

    You may use local storage of the browser. However if you want to be really flexible you may use nodejs and sockets. That's how I made my extension. I used nodejs, which has an access to the user's disk and sockets to communicate with the node app. The only one problem is that the user should install the module.

    0 讨论(0)
提交回复
热议问题