Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/index.js b/src/index.js
index b562651..ee9cea9 100644
--- a/src/index.js
+++ b/src/index.js
@@ -7,6 +7,12 @@ import { scenarios } from './modules/scenarios.js';
globalThis.svgns = 'http://www.w3.org/2000/svg';
+if (window.IS_DEV) {
+ const source = new EventSource('/esbuild');
+ source.addEventListener('change', () => location.reload());
+ // source.addEventListener('message', (e) => console.log(e));
+}
+
const mapPlaceholder = document.querySelector('.map-placeholder'),
distanceOutput = document.getElementById('status'),
proneToggle = document.getElementById('toggle-prone-counter'),