count-tabs

Count the tabs that a user has open.

npm install count-tabs
1 downloads in the last day
28 downloads in the last week
95 downloads in the last month

count-tabs

Count the tabs that a user has open.

Also, assign a unique id for each tab. Tabs cannot reuse the same id, because they do not share memory -- they are running in different VMs, effectively a distributed system, if they can communicate.

var tabs = require('count-tabs')(function (up) {
  document.getElementById('tabs_counter').innerText = up
})

document.getElementById('my_id').innerText = tabs.id

License

MIT

npm loves you