apparently this is required to work for v3, AND NO ONE TOLD ME

This commit is contained in:
Tangent / Rose / Nebula Rosa 2024-10-20 17:53:02 -06:00
parent 1efcc58dc8
commit 3fcdc86679

View File

@ -25,7 +25,7 @@ var shuffle = function (array) {
return array; return array;
}; };
browser.browserAction.onClicked.addListener(function() { browser.action.onClicked.addListener(function() {
browser.tabs.query({}, function(tabs) { 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 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?") var ok = confirm("Are you sure you want to close " + count + " tabs?")
@ -44,7 +44,7 @@ browser.browserAction.onClicked.addListener(function() {
function updateCount() { function updateCount() {
browser.tabs.query({}, function(tabs) { browser.tabs.query({}, function(tabs) {
let count = Math.floor(tabs.length / 2) let count = Math.floor(tabs.length / 2)
browser.browserAction.setBadgeText({ text: "" + count }) browser.action.setBadgeText({ text: "" + count })
}) })
} }