diff options
| author | Akshay Nair <phenax5@gmail.com> | 2024-08-19 14:36:34 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2024-08-19 14:36:34 +0530 |
| commit | 6206aaf88532d153f0e01e22772b7f6e1c979afd (patch) | |
| tree | 15573ffa93088ba2c10e86af2675045086975555 /modules/firefox.home/chrome/setupNewTab.uc.js | |
| parent | 02612ccd49d561808ff931611b2ea865038b0a51 (diff) | |
| download | nixos-config-6206aaf88532d153f0e01e22772b7f6e1c979afd.tar.gz nixos-config-6206aaf88532d153f0e01e22772b7f6e1c979afd.zip | |
Enabled user js for firefox + global keybindings manager
Diffstat (limited to 'modules/firefox.home/chrome/setupNewTab.uc.js')
| -rw-r--r-- | modules/firefox.home/chrome/setupNewTab.uc.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/modules/firefox.home/chrome/setupNewTab.uc.js b/modules/firefox.home/chrome/setupNewTab.uc.js new file mode 100644 index 0000000..1eb971c --- /dev/null +++ b/modules/firefox.home/chrome/setupNewTab.uc.js @@ -0,0 +1,20 @@ +// ==UserScript== +// @name Custom New Tab +// @version 1.0 +// @description Load a custom link or local file, instead of the default new tab page (about:newtab). +// ==/UserScript== + +// For Firefox 72 onward, see the autoconfig alternative to this: +// https://support.mozilla.org/questions/1251199#answer-1199709 + +globalThis.newtabLinkStarted = true; + +if (!AboutNewTab) { + globalThis.AboutNewTab = ChromeUtils.import('resource:///modules/AboutNewTab.jsm').AboutNewTab; +} + +const newTabUrl = xPref.get('browser.newtab.url') || 'about:blank'; + +AboutNewTab.newTabURL = newTabUrl; + +console.log('Updated new tab url to', newTabUrl); |
