https://github.com/nobe4/fomo.js
Fear of missing out. JS to the rescue !
https://github.com/nobe4/fomo.js
Last synced: 3 months ago
JSON representation
Fear of missing out. JS to the rescue !
- Host: GitHub
- URL: https://github.com/nobe4/fomo.js
- Owner: nobe4
- License: mit
- Created: 2016-03-01T22:30:31.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-14T13:30:48.000Z (over 10 years ago)
- Last Synced: 2025-03-13T10:22:39.086Z (over 1 year ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fomo.js
Fear of missing out. JS to the rescue !
Add an url, a selector and let the notifications flow !
See test.js for an example.
## Installation
npm install nobe4/fomo.js
## Usage
var fomo = require('fomo.js');
fomo( /* config */ );
When you click on the notification, it will open the url in your web browser.
## Config
The configuration has the following format :
[
{ url : '', selector: '', frequence: 0, callback: function(url, innerText, innerHTML) {} },
...
]
The frequence is optional (default: 1 minute).
The callback is optional. By default the notification pops up and nothing else happens. If you do specify one, it will prevent the notification.
## How does it work ?
The script fetches the url, get the text of the first element matched by the selector and look for changes. Each time the value changes, a notification will be sent.
## Contribution
Idea, bug? Open a new issue!
## License
MIT