2016-03-15 56 views
1

我想在Firefox中使用WebExtensions制作一个自定义的开始页面。 在Chrome中,我可以在manifest.json(chrome_url_overrides)中设置页面,但Firefox不支持此功能。 我使它变得chrome.tabs.onCreated.addListenerchrome.tabs.update,但我在短时间内看到标准主页,直到脚本处理。 如何通过WebExtensions更加定性地实现它?Mozilla网络扩展开始页面

+0

Firefox现在应该支持从webextension覆盖newtab页面。请参阅https://bugzilla.mozilla.org/show_bug.cgi?id=1234150。我还没有能够测试这个。 – prtksxna

回答

1

Support overriding newtab page from a webextension的问题已经解决,并且修复程序已在Firefox 54(Nightly,在撰写此答案时)着陆。这意味着您可以像平常一样在您的manifest.json中使用chrome_url_overrides。例如:

{ 
    "manifest_version": 2, 
    "name": "Test", 
    "version": "1.0", 
    "description": "Test.", 

    "chrome_url_overrides": { 
     "newtab": "test.html" 
    } 
}