如何同步Chrome扩展选项 [英] How to sync chrome extension options

查看:485
本文介绍了如何同步Chrome扩展选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我制作了一个带选项页的Chrome扩展程序。这些数据保存在localstorage中,并且运行良好。



Chrome不会将本地存储同步到云端,只是扩展名。这意味着任何用户数据都不会同步到同一个Google帐户的其他计算机。



我无法在 http://developer.chrome.com/extensions/docs.html ,它允许我同步用户选择的首选项。



你建议使用什么方法?

解决方案

将来),您将成为您现在可以将内容存储在 chrome.storage.sync ,它会自动同步。



除非您现在需要 ,否则请考虑将所有配置放在一个对象中,稍后您可以同步它!

编辑:现在这是可在稳定的Chrome中使用


I've made a Chrome extension with an options page. The data is saved in localstorage and works just fine.

Chrome doesn't sync the localstorage to the cloud, just the extensions. This means that any user data will not sync to other computers of the same google account.

I can not find an API at http://developer.chrome.com/extensions/docs.html which allows me to sync the user-chosen preferences.

What methods do you suggest?

解决方案

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!

这篇关于如何同步Chrome扩展选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆