- Gelöst
Customize New Tab with a local HTML file after Firefox 136
Hello, I wanted to customize my Firefox new tab with a local HTML file, such as "/path/to/my/index.html". It was possible to use this workaround: https://github.com/Jang… (Lesen Sie mehr)
Hello,
I wanted to customize my Firefox new tab with a local HTML file, such as "/path/to/my/index.html". It was possible to use this workaround: https://github.com/Jangsoodlor/Firefox-New-Tab-Config/tree/main https://github.com/Jangsoodlor/Firefox-New-Tab-Config/tree/main
Which implied a configuration file (sometimes named "autoconfig.cfg", "firefox.cfg", "local-settings.cfg" depending on the guide since the name is arbitrary) with javascript code. In the new Firefox 136, this code fails to execute due to a new API being used.
If you want to customize your new tab, follow the previous guide, but on the configuration file write this code instead:
// My new tab try { const ff = {}; ChromeUtils.defineESModuleGetters(ff, {AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs"}); ff.AboutNewTab.newTabURL = 'file:///path/to/my/index.html'; } catch (e) {ChromeUtils.reportError(e);}
Note that the file must start with a comment
Adapting the "/path/to/my/index.html" to your needs.
Thanks to @mkaply (github) on this thread https://github.com/mozilla/policy-templates/discussions/1190 for the new API method.
I post this here in case someone has the same issue, because is quite recent and hard to find on the internet.