No description, website, or topics provided.
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
.gitignore
LICENSE
README.md
index.js
package.json

README.md

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