移植到WebExtensions时访问旧式Firefox扩展的首选项 [英] Access old-style Firefox extension's preferences when porting to WebExtensions

查看:94
本文介绍了移植到WebExtensions时访问旧式Firefox扩展的首选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的基于XUL的Firefox扩展程序在首选项中存储数据.迁移到WebExtension版本时是否可以访问一次此数据?

My XUL-based Firefox extension stores data in preferences. Is there a way to access this data once when migrating to a WebExtension version?

我知道 https://wiki.mozilla.org/WebExtensions/FAQ #Does_the_WebExtensions_API_provide_access_to_preferences.3F ,但希望有针对此特定用例的解决方案.

I am aware of https://wiki.mozilla.org/WebExtensions/FAQ#Does_the_WebExtensions_API_provide_access_to_preferences.3F but hope there is a solution for this specific use-case.

推荐答案

根据首选项的数量,有一些选项:

Depending on the number of preferences, there are a few options:

除了上述选项之外,还可以使用混合网络扩展名,该扩展名可以读取首选项并将其发布在addons.mozilla.org上,但是如果我没有记错的话,该选项自Firefox 57起就失效了.

Aside from the options above, it was possible to have a hybrid webextension which could read the preferences and publish it on addons.mozilla.org, but that option expired as of Firefox 57 if I am not mistaken.

这篇关于移植到WebExtensions时访问旧式Firefox扩展的首选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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