Chrome扩展程序的LocalStorage同步功能是否已经可用? [英] Is LocalStorage synchronization for Chrome extensions already available?

查看:538
本文介绍了Chrome扩展程序的LocalStorage同步功能是否已经可用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现铬问题标题为允许附加信息/应用同步他们自己的设置,状态为固定。它从2011年12月开始。那么它工作吗?如果是这样,它是如何工作的,以及文档在哪里?上一次 上一次类似的问题在2010年被问到,然后答案是使用书签黑客。我认为是该更新此主题的时候了。



更新:我刚刚找到这些文档的实验 chrome.storage API。这是我在找什么?我们是否有新的选择(书签除外),直到 chrome.storage 变得稳定了?

解决方案



  • chrome.experimental.storage 作为Chrome 18中的实验性API引入。 li>在Chrome 19中,API仅限于Dev频道。

  • 自Chrome 20以来,API不再是实验性的 文档 | 示例



  • 要使用API​​,需要清单版本2。这是获取扩展程序在Chrome 20 +中工作的最低清单文件:

      {
    name: 测试,
    版本:1,
    manifest_version:2,
    permissions:[storage]
    }


    I found chromium issue titled "Allow extensions/apps to sync their own settings" that has status 'Fixed'. It's from December 2011. So, does it work? If so, how does it work and where are the docs?

    Last time similar question was asked in 2010 and then the answer was to use bookmarks hack. I think it's time to have an update on this topic.

    Update: I just found these docs for experimental chrome.storage API. Is this what I'm looking for? Do we have any new alternatives (other than bookmarks) till chrome.storage goes stable?

    解决方案

    • chrome.experimental.storage was introduced as an experimental API in Chrome 18.
    • In Chrome 19, the API became restricted to the Dev channel.
    • Since Chrome 20, the API is not experimental any more Docs | Examples.

    To use the API, manifest version 2 is required. This is the minimum manifest file to get an extension to work in Chrome 20+:

    {
      "name": "test",
      "version": "1",
      "manifest_version": 2,
      "permissions": ["storage"]
    }
    

    这篇关于Chrome扩展程序的LocalStorage同步功能是否已经可用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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