aboutsummaryrefslogtreecommitdiff
path: root/modules/firefox.home/chrome/customNewTab.uc.js
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2026-06-06 18:50:40 +0530
committerAkshay Nair <phenax5@gmail.com>2026-06-06 18:50:40 +0530
commita7214b76e3f3a01f8ec6a6f8a9fe49e67765a3c5 (patch)
treef6f26a429d8a27b5623024963fbebdcc8d0881f6 /modules/firefox.home/chrome/customNewTab.uc.js
parent210d4bf063d10a723f66029c2a12610e479d172c (diff)
downloadnixos-config-a7214b76e3f3a01f8ec6a6f8a9fe49e67765a3c5.tar.gz
nixos-config-a7214b76e3f3a01f8ec6a6f8a9fe49e67765a3c5.zip
Changes to firefox configHEADmain
Diffstat (limited to '')
-rw-r--r--modules/firefox.home/chrome/customNewTab.uc.js41
1 files changed, 0 insertions, 41 deletions
diff --git a/modules/firefox.home/chrome/customNewTab.uc.js b/modules/firefox.home/chrome/customNewTab.uc.js
deleted file mode 100644
index 7ea8ee2..0000000
--- a/modules/firefox.home/chrome/customNewTab.uc.js
+++ /dev/null
@@ -1,41 +0,0 @@
-// ==UserScript==
-// @name Custom New Tab
-// @version 1.0
-// @description Load a custom link or local file, instead of the default new tab page
-// @include main
-// @startup UC.customNewTab.updateNewTabURL()
-// @shutdown UC.customNewTab.destroy();
-// @onlyonce
-// ==/UserScript==
-
-console.log('------------------------- newtab')
-(() => {
- // Managed in about:config
- const NEWTAB_URL_PREF = 'browser.newtab.url'
-
- if (!AboutNewTab) {
- globalThis.AboutNewTab = ChromeUtils.importESModule('resource:///modules/AboutNewTab.sys.mjs').AboutNewTab;
- }
-
- const module = {
- updateNewTabURL: () => {
- const newTabUrl = xPref.get(NEWTAB_URL_PREF) || 'about:blank';
- if (AboutNewTab.newTabURL === newTabUrl) return;
-
- AboutNewTab.newTabURL = newTabUrl;
- console.log('Updated new tab url to', newTabUrl);
- },
-
- init() {
- module.updateNewTabURL();
- Services.obs.addObserver(module.updateNewTabURL, 'newtab-url-changed');
- },
- destroy() {
- Services.obs.removeObserver(module.updateNewTabURL, 'newtab-url-changed');
- },
- };
-
- module.init();
-
- UC.customNewTab = module;
-})();