count-tabs

0.2.5 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i count-tabs

Weekly Downloads

175

Version

0.2.5

License

MIT

Last publish

Collaborators

  • dominictarr
  • nopersonsmodules