如何通过扩展来更改Chromium配置 [英] How to change Chromium configs through extension
问题描述
我需要一些关于Chromium扩展可能性的建议。扩展名可以更改浏览器的配置,例如:主页,协议处理程序(tel,mailto)的默认行为,安全设置(例如防范危险网站),禁止向Google发送统计信息等。 >
可以更改 chrome:// settings /
中的配置,并在可能的情况下如何进行配置?
从中您可以收集以下功能:
-
accessibilityFeatures
API 处理可访问性设置。browseData
API 处理清算浏览数据。 -
contentSettings
API ,它处理允许的内容,网站权限和插件。downloads API
至少可以部分影响下载设置。fontSettings
API 可以管理Chrome使用的字体。 -
management
API 可以管理(但不安装)其他扩展程序。 -
privacy
API 处理隐私相关设置(包括一些安全设置)。 ://developer.c hrome.com/extensions/proxyrel =nofollow noreferrer>proxy
API 可以管理代理设置。
此外,还有很多特定于Chrome OS的API,我不会在这里列出。
还有一些清单这些键可以影响安装时的Chrome设置 - 例如主页。请参阅 chrome_settings_overrides
(注意:不可用在Linux上)和在较小程度上覆盖页面。
另请参阅保护用户设置Windows使用新的设置API (它宣布了上述内容)。
除此之外,否,您无法覆盖Chrome设置。您不能动态地更改家庭或搜索提供程序,您无法控制协议处理程序(无论如何都是在操作系统级别)等。
注你不能在 chrome:// *
页面中注入脚本,所以你将无法摆弄UI。
I need some advice about Chromium extension possibilities. Can the extension change configs of the browser such as: home page, default behavior for protocol handlers (tel, mailto), security settings ("protect from dangerous websites" for example), disable sending statistics to Google, etc.?
Which configs from chrome://settings/
can be changed and how to do it if it's possible?
The Chrome API index is a good place to start.
From it, you can glean the following capabilities:
accessibilityFeatures
API that deals with accessibility settings.browsingData
API that deals with clearing browsing data.contentSettings
API that deals with allowed content, site permissions and plugins.downloads
API can at least partially influence download settings.fontSettings
API can manage fonts used by Chrome.management
API can manage (but not install) other extensions.privacy
API deals with privacy-related settings (that includes some security settings).proxy
API can manage proxy settings.
In addition, there's a lot of Chrome OS specific APIs I won't list here.
There are also some manifest keys that can influence Chrome settings on install - such as the home page. See chrome_settings_overrides
(note: not available on Linux) and to a lesser extent Override Pages.
See also Protecting user settings on Windows with the new Settings API (which announced the above).
Other than those, no, you can't override Chrome settings. You cannot dynamically change the home or search provider, you can't control protocol handlers (that's on OS level anyway), etc.
Note that you can't inject scripts into chrome://*
pages, so you won't be able to just fiddle with the UI.
这篇关于如何通过扩展来更改Chromium配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!