Hi everyone,
I am having trouble getting my custom new tab page to be focused when opened (instead of the address bar).
I am currently using the `autoconfig.js` + `mozill… (read more)
Hi everyone,
I am having trouble getting my custom new tab page to be focused when opened (instead of the address bar).
I am currently using the `autoconfig.js` + `mozilla.cfg` approach to overriding the `AboutNewTab.jsm` service with a custom local file. This is working great with the two files containing this code:
autoconfig.js:
```
pref("general.config.filename", "mozilla.cfg");
pref("general.config.obscure_value", 0);
```
mozilla.cfg:
```
// Custom firefox config
let { classes:Cc, interfaces:Ci, utils:Cu } = Components;
try {
Cu.import("resource:///modules/AboutNewTab.jsm");
let newTabURL = "file:///home/vallode/Documents/test/index.html";
AboutNewTab.newTabURL = newTabURL;
} catch(e) { Cu.reportError(e); }
```
I have been attempting to use the `gBrowser` global to add an event listener to the new tab opening, but with no success.
Could anyone point me in the right direction for something like this?