Browser support: Chrome, Safari
Watches the current selection and displays a count of a noun in a label.
If multiple SelectionCounter instances exist, they will be grouped together.
If instantiated in a browser extension context (e.g., safari, chrome), will listen for messages:
- Chrome:
message.active
(boolean) will set state - Safari:
event.name === 'active' && event.message
will set state
And may send messages to browser runtime / tab:
- Chrome:
sendMessage({ active: false })
when deactivated,sendMessage({ active: true })
when activated - Safari:
dispatchMessage('active', false)
when deactivated,dispatchMessage('active', true)
when activated
Parameters:
- countedNoun (String): Thing to be counted. Options: "character", "word". (default: "character")
Start counter
Stop counter
$ npm install -g dox
$ ./generate-docs > README.md
Where X.Y.Z is the new version number:
$ git tag -a vX.Y.Z
$ git push --tags