How to sync chrome extension options

☆樱花仙子☆ 提交于 2019-12-02 17:40:01
Camilo Martin

In the (hopefully near) future, you'll be You are now able to store stuff in chrome.storage.sync, and it will be synced automagically.

Unless you need something right now, do consider putting all your configurations in an single object, sometime later you'll be able to just sync it!

Edit: now this is available in stable Chrome!

Nathan Moos told you truth :) But you don't need to write it by oneself, you can use Ankit Ahuja solution from Sylebot extension. You will need file js/sync.js. Source code is great, and it works great!

You should be able to use HTML5 WebDatabases, but you cannot. See comments below.

You could serialize some of the options to a bookmark and tell the user to enable bookmark sync. Then, you could read from the bookmark or build a pseudo-"localStorage" object around the bookmark.

You could try to do it with Google Docs like Chrome does with bookmarks. I don't know how far the api reaches but this seems a rather basic operation.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!