Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/curtiscde/tab-notifier

📫 JS Library for managing your browser title notifications
https://github.com/curtiscde/tab-notifier

document-title js-library

Last synced: about 1 month ago
JSON representation

📫 JS Library for managing your browser title notifications

Awesome Lists containing this project

README

        

# Tab Notifier

Travis CI Build Status [![Coverage Status](https://coveralls.io/repos/github/curtistimson/tab-notifier/badge.svg?branch=ci)](https://coveralls.io/github/curtistimson/tab-notifier?branch=ci)

## Usage

```
import TabNotifier from 'tab-notifier';
```

### `notify()`

Prefixes the document title with a number

```
TabNotifier.notify(); // prefixes title with (1)
TabNotifier.notify(1); // prefixes title with (1)
TabNotifier.notify(2); // prefixes title with (2)
```

### `notifyMessage()`

Updates the document title to a specific message and alternates every 1 second by default

```
TabNotifier.notifyMessage('New Message Received!');
```

Options:

```
TabNotifier.notifyMessage('New Message Received!', {
intervalSpeed: 1000
});
```

### `reset()`

Resets the title back to the original document title

```
TabNotifier.reset();
```

## Development

```
npm start
```

## Build

```
npm run build
```