2016-08-25 97 views
0

我寫了簡單的搜索擴展。它在Windows上正常工作,但在Mac上無法正常工作。擴展程序設置了newTab頁面,主頁和默認搜索提供程序。但在Mac搜索提供商沒有改變(我的意思是當我輸入url字段,多功能框),它仍然是谷歌。Chrome設置覆蓋不能在mac上工作

這裏是清單:

{ 
"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改變搜索?

回答

0

報價the docs

的API僅適用於Windows操作系統。

+0

哦,看起來我錯過了那條線。有沒有辦法來重寫多功能框搜索並將我的搜索設置爲默認? – clzola

+0

我不認爲有,恐怕。但我不確定。 – Xan

0

設置覆蓋目前可用於Windows和Mac,Mac中的Chrome 56及更高版本。目前還沒有Linux。

Chrome可能是目前唯一允許在某個級別設置覆蓋的瀏覽器。

瑣事:但是,一般設置覆蓋(定製(對於用戶自己的客戶端))需要通過核心Chromium進行更嚴格的安全性調整和修剪。

有關瀏覽器的一般問題:目前瀏覽器正處於快速開發週期--Mozilla/Firefox與Chrome,Opera,Vivaldi和Safari一起推出了瀏覽器開發工具。

設置不久即可覆蓋?恐怕這是一個沒有。有很多事情發生atm。