Hi I am developing a firefox extension that replaces the new tab.
I have it working in XUL, but I want to switch it over to addon sdk.
In XUL I disable the browser.newtab.preload and then listen for tabopen etc events to finally load my replacement.
Unfortunately, if I try to do this with the addon sdk:
require("sdk/preferences/service").set("browser.newtab.preload", false);
var resourceUrl = "myurl";
tabs.on('open', function(tab) {
tab.on('load',function(tab) {
if(tab.url == "about:newtab") {
tab.url = resourceUrl;
}
})
});
It shows the default new tab page for a fraction of a second. Is there a way to disable that?