From 3fcdc8667914bebb7066675286c2a70be0ab2a70 Mon Sep 17 00:00:00 2001 From: Tangent Date: Sun, 20 Oct 2024 17:53:02 -0600 Subject: [PATCH] apparently this is required to work for v3, AND NO ONE TOLD ME --- extension/background.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extension/background.js b/extension/background.js index b50700e..1f85757 100644 --- a/extension/background.js +++ b/extension/background.js @@ -25,7 +25,7 @@ var shuffle = function (array) { return array; }; -browser.browserAction.onClicked.addListener(function() { +browser.action.onClicked.addListener(function() { browser.tabs.query({}, function(tabs) { let count = Math.floor(tabs.length / 2) + 1 // I don't remember why we need an extra +1 here, but it is necessary var ok = confirm("Are you sure you want to close " + count + " tabs?") @@ -44,7 +44,7 @@ browser.browserAction.onClicked.addListener(function() { function updateCount() { browser.tabs.query({}, function(tabs) { let count = Math.floor(tabs.length / 2) - browser.browserAction.setBadgeText({ text: "" + count }) + browser.action.setBadgeText({ text: "" + count }) }) }