Chrome 设置覆盖在 mac 上不起作用

Chrome Setting Overrides not working on mac

我写了简单的搜索扩展。它在 Windows 上运行良好,但在 Mac 上运行不佳。扩展设置新标签页、主页和默认搜索提供程序。但是 Mac 上的搜索提供程序没有改变(我的意思是当我在 url 字段中键入时,多功能框),它仍然是 google。

这是清单:

{
"name" : "Example",
"short_name" : "example",
"manifest_version" : 2,
"version" : "2.6.1.0",
"description" : "Example Extension Description",

"chrome_settings_overrides" : {
    "homepage" : "http://example.com/",

    "search_provider" : {
        "name": "Example Search Name",
        "is_default" : true,
        "encoding" : "UTF-8",
        "favicon_url": "http://example.com/favicon.png",
        "keyword" : "keyword.example.com",
        "search_url" : "http://example.com/?q={searchTerms}&gid=SDD316",
        "suggest_url" : "http://example.com/suggest.php?q={searchTerms}&gid=SDD316"
    },
    "startup_pages" : ["http://example.com"]
},
"chrome_url_overrides" : {
    "newtab" : "html/newTab.html"
},
"icons" : {
    "128" : "icon128.png",
    "16" : "icon16.png",
    "48" : "icon48.png"
},
"browser_action": {
    "default_icon": "w.png",
    "default_title": "Example Search",
    "default_popup": "html/popup.html"
},
"background" : {
    "scripts" : ["js/jquery-3.0.0.min.js", "js/background.js"]
},
"permissions" : ["storage", "http://*/*", "https://*/*", "unlimitedStorage", "chrome://favicon/*", "webRequest", "webRequestBlocking" ,"cookies", "*://*.test.com/*"],
"content_scripts":  [
    {
        "js": [
            "js/start.js"
        ],
        "matches": [
            "http://example.com/*"
        ],
        "all_frames": false,
        "run_at": "document_end"
    }]

}

不会chrome_settings_overrides.search_provider更改多功能框中的搜索吗?

引用 the docs:

The API is available only on Windows.

设置覆盖目前在 Windows 和 Mac 中可用,Mac 在 Chrome 56 及更高版本中可用。暂时没有 Linux。

Chrome 可能是目前唯一允许在某种程度上覆盖设置的浏览器。

琐事:然而,常规设置覆盖(自定义(针对用户自己的客户端))需要核心 Chromium 进行更严格的安全调整和修剪。

关于浏览器的一般信息:目前浏览器的开发周期非常快 - Mozilla/Firefox 与 Chrome 一起出现,Opera、Vivaldi 和 Safari 真的很有趣浏览器开发

设置会很快被覆盖吗?恐怕不行。 atm 发生了很多事情。