Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ const updateIcon = async function updateIcon () {
let currentTab = (await browser.tabs.query({ currentWindow: true, active: true }))[0]

// Get tabs in current window, tabs in all windows, and the number of windows
let currentWindow = (await browser.tabs.query({ currentWindow: true })).length.toString()
let allTabs = (await browser.tabs.query({})).length.toString()
let currentWindow = (await browser.tabs.query({ currentWindow: true, hidden: false })).length.toString()
let allTabs = (await browser.tabs.query({ hidden: false })).length.toString()
let allWindows = (await browser.windows.getAll({ populate: false, windowTypes: ['normal'] })).length.toString()

if (typeof currentTab !== 'undefined') {
Expand Down
4 changes: 2 additions & 2 deletions src/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
*/

async function start () {
let currentWindow = (await browser.tabs.query({ currentWindow: true })).length
let allTabs = (await browser.tabs.query({})).length
let currentWindow = (await browser.tabs.query({ hidden: false, currentWindow: true })).length
let allTabs = (await browser.tabs.query({ hidden: false })).length
let allWindows = (await browser.windows.getAll({ populate: false, windowTypes: ['normal'] })).length.toString()
document.getElementById('currentWindow').textContent = currentWindow
document.getElementById('allTabs').textContent = allTabs
Expand Down