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

https://github.com/nobe4/tiny-reload.js

Drop-in file reloader, vanilla JS
https://github.com/nobe4/tiny-reload.js

Last synced: 3 months ago
JSON representation

Drop-in file reloader, vanilla JS

Awesome Lists containing this project

README

          

# tiny-reload.js

Drop-in file reloader, vanilla JS.

Watch a set of URLs and reload the page when one changes.

# How-to

See [index.html](https://github.com/nobe4/tiny-reload.js/blob/master/index.html) or

```html



tinyReload([
'tiny-reload.js',
'index.html',
]);

```

# Config

The `tinyReload` function accepts 3 arguments:

- An array, listing all the URLs you want to watch.
- An integer, the number of milliseconds between two fetch (optional, default to `10000`).
- A boolean, whether you want to display the errors or not (optional, default to `false`).

# License

[MIT](https://github.com/nobe4/tiny-reload.js/blob/master/LICENSE)