From 06876bcf00b3793c7337798a31fadace2e0aaae1 Mon Sep 17 00:00:00 2001 From: LeonGr Date: Fri, 8 Mar 2024 14:42:37 +0100 Subject: [PATCH] Update all tabs when a new tab is created When using Ctrl+Click on a link, for example, a new tab can be created in front of existing tabs. This ensures that the numbering of the existing tabs gets updated accordingly. --- tab-numbering.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tab-numbering.js b/tab-numbering.js index 6f31929..ed5c40e 100644 --- a/tab-numbering.js +++ b/tab-numbering.js @@ -49,5 +49,8 @@ browser.tabs.onRemoved.addListener(() => { browser.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) { update(tab) }) +browser.tabs.onCreated.addListener(() => { + updateAll() +}) updateAll()