This Tampermonkey user script facilitates live reloading during development on a local host using Live.js. It is an easy-to-use tool that ensures your local development environment automatically reflects recent changes in your code without the need to manually refresh the page. Activate or deactivate it based on the port you want to use.
- Automatic Reload: Reloads the web page whenever changes in HTML, CSS, or JavaScript files are detected.
- Toggle Live Reload: Easily enable or disable live reload through the Tampermonkey menu.
- Status Notification: Shows the current status (enabled or disabled) of the live reload feature.
- Install Tampermonkey.
- Go to the live_reload.user.js script.
- Press the Install button.
- Start the server on the port where you will be working and navigate to your localhost address in the browser.
- Click on the extensions button and select Tampermonkey.
- In the Tampermonkey menu, find
Live Reload with Live.js
and clickEnable Live Reload on port...
. - To view the status or disable live reload, go back to the extension menu.
Note
Live reload is disabled by default. When toggled, the state is saved in the local storage based on the port, ensuring persistence and a consistent configuration per port.
- Live.js: The core functionality for live reloading is powered by Live.js, originally created by Martin Kool (@mrtnkl). This script uses a version of Live.js from dreua's fork, ensuring compatibility and additional features.
Enjoy seamless and automatic live reloading for your localhost development with this Tampermonkey user script!