Skip to content

nobe4/tiny-reload.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 or

<body>
	<script type="text/javascript" src="tiny-reload.js"></script>
	<script type="text/javascript">
		tinyReload([
			'tiny-reload.js',
			'index.html',
		]);
	</script>
</body>

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

About

Drop-in file reloader, vanilla JS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published