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
- Host: GitHub
- URL: https://github.com/nobe4/tiny-reload.js
- Owner: nobe4
- License: mit
- Created: 2017-10-25T10:48:21.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-01-17T09:04:13.000Z (over 2 years ago)
- Last Synced: 2025-12-30T22:44:48.901Z (7 months ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)