Firefox扩展程序,用于更改about:config中的值 [英] A Firefox extension that changes a value in the about:config

查看:69
本文介绍了Firefox扩展程序,用于更改about:config中的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在网上搜寻一些细微的光,但是什么也没找到.我需要创建一个Firefox扩展,该扩展除了其他功能外,还可以更改about:config变量之一的值.我发现的教程都没有涵盖该问题,因此我不知道从哪里开始.有人可以给我扔一个链接,一些代码行或说明,只是为了帮助我入门吗?预先感谢.

I've been searching far and wide through the web for some tiny bit of light, but found nothing. I need to create a Firefox extension that, among a few other things, changes the value of one of the about:config variables. None of the tutorials I've found covers that issue, so I don't know where to start. Can anyone throw me a link, or some lines of code or explanation, just to help me get started? Thanks in advance.

推荐答案

Firefox 57和更高版本(WebExtensions)

不可能,中的详细信息是否可以创建更改about:config设置的Firefox WebExtension?怎么样?

about:config值是通过首选项系统访问的.之所以用extensions.myextension作为扩展名的前缀,是因为您需要确保不会与Firefox或其他扩展的首选项发生冲突.

The about:config values are accessed via the preferences system. The reason you preface your extension's prefs with extensions.myextension is because you need to make sure you don't collide with Firefox's or another extension's preferences.

要获得Firefox首选项,只需使用与about:config中相同的首选项名称即可.如果您注意到了,您还将看到在about:config中也看到了所有扩展首选项.

To get a firefox preference just use the same preference name as you see in about:config. If you notice, you'll see that you also see all of the extension prefs in about:config too.

https://developer.mozilla.org/en/XUL_School/Handling_Preferences * https://developer.mozilla.org/en/Code_snippets/Preferences

这篇关于Firefox扩展程序,用于更改about:config中的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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