From 653b19aa1e732f56453db383504fe8a5438bda5a Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 8 Feb 2026 13:15:45 +0530 Subject: Enable firefox --- modules/firefox.home/chrome/customNewTab.uc.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'modules/firefox.home/chrome/customNewTab.uc.js') diff --git a/modules/firefox.home/chrome/customNewTab.uc.js b/modules/firefox.home/chrome/customNewTab.uc.js index 4c8faca..7ea8ee2 100644 --- a/modules/firefox.home/chrome/customNewTab.uc.js +++ b/modules/firefox.home/chrome/customNewTab.uc.js @@ -2,20 +2,19 @@ // @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' - console.log('-------------------------------------------'); - console.log('-------------------------------------------'); - console.log('-------------------------------------------'); - if (!AboutNewTab) { - globalThis.AboutNewTab = ChromeUtils.import('resource:///modules/AboutNewTab.jsm').AboutNewTab; + globalThis.AboutNewTab = ChromeUtils.importESModule('resource:///modules/AboutNewTab.sys.mjs').AboutNewTab; } const module = { @@ -28,10 +27,6 @@ }, init() { - console.log('-------------------------------------------'); - console.log('init new tab'); - console.log('-------------------------------------------'); - module.updateNewTabURL(); Services.obs.addObserver(module.updateNewTabURL, 'newtab-url-changed'); }, -- cgit v1.3.1