我寫了簡單的搜索擴展。它在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
改變搜索?
哦,看起來我錯過了那條線。有沒有辦法來重寫多功能框搜索並將我的搜索設置爲默認? – clzola
我不認爲有,恐怕。但我不確定。 – Xan