Skip to content

Commit d1b8209

Browse files
committed
minor refactor
1 parent ac7aefe commit d1b8209

40 files changed

Lines changed: 5 additions & 600 deletions

docs/404.html

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -176,22 +176,6 @@ <h1 id="document-not-found-404"><a class="header" href="#document-not-found-404"
176176

177177
</div>
178178

179-
<!-- Livereload script (if served using the cli tool) -->
180-
<script>
181-
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
182-
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
183-
const socket = new WebSocket(wsAddress);
184-
socket.onmessage = function (event) {
185-
if (event.data === "reload") {
186-
socket.close();
187-
location.reload();
188-
}
189-
};
190-
191-
window.onbeforeunload = function() {
192-
socket.close();
193-
}
194-
</script>
195179

196180

197181

docs/Accessibility.html

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -304,22 +304,6 @@ <h2 id="screen-reader-support"><a class="header" href="#screen-reader-support">S
304304

305305
</div>
306306

307-
<!-- Livereload script (if served using the cli tool) -->
308-
<script>
309-
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
310-
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
311-
const socket = new WebSocket(wsAddress);
312-
socket.onmessage = function (event) {
313-
if (event.data === "reload") {
314-
socket.close();
315-
location.reload();
316-
}
317-
};
318-
319-
window.onbeforeunload = function() {
320-
socket.close();
321-
}
322-
</script>
323307

324308

325309

docs/Animations.html

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -307,22 +307,6 @@ <h2 id="timeouts"><a class="header" href="#timeouts">Timeouts</a></h2>
307307

308308
</div>
309309

310-
<!-- Livereload script (if served using the cli tool) -->
311-
<script>
312-
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
313-
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
314-
const socket = new WebSocket(wsAddress);
315-
socket.onmessage = function (event) {
316-
if (event.data === "reload") {
317-
socket.close();
318-
location.reload();
319-
}
320-
};
321-
322-
window.onbeforeunload = function() {
323-
socket.close();
324-
}
325-
</script>
326310

327311

328312

docs/Browsers.html

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -260,22 +260,6 @@ <h1 id="browsers"><a class="header" href="#browsers">Browsers</a></h1>
260260

261261
</div>
262262

263-
<!-- Livereload script (if served using the cli tool) -->
264-
<script>
265-
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
266-
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
267-
const socket = new WebSocket(wsAddress);
268-
socket.onmessage = function (event) {
269-
if (event.data === "reload") {
270-
socket.close();
271-
location.reload();
272-
}
273-
};
274-
275-
window.onbeforeunload = function() {
276-
socket.close();
277-
}
278-
</script>
279263

280264

281265

docs/Buttons.html

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -324,22 +324,6 @@ <h3 id="togglebutton"><a class="header" href="#togglebutton">ToggleButton</a></h
324324

325325
</div>
326326

327-
<!-- Livereload script (if served using the cli tool) -->
328-
<script>
329-
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
330-
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
331-
const socket = new WebSocket(wsAddress);
332-
socket.onmessage = function (event) {
333-
if (event.data === "reload") {
334-
socket.close();
335-
location.reload();
336-
}
337-
};
338-
339-
window.onbeforeunload = function() {
340-
socket.close();
341-
}
342-
</script>
343327

344328

345329

docs/Colors.html

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -231,22 +231,6 @@ <h1 id="colors"><a class="header" href="#colors">Colors</a></h1>
231231

232232
</div>
233233

234-
<!-- Livereload script (if served using the cli tool) -->
235-
<script>
236-
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
237-
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
238-
const socket = new WebSocket(wsAddress);
239-
socket.onmessage = function (event) {
240-
if (event.data === "reload") {
241-
socket.close();
242-
location.reload();
243-
}
244-
};
245-
246-
window.onbeforeunload = function() {
247-
socket.close();
248-
}
249-
</script>
250234

251235

252236

docs/Cross-Compiling.html

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -488,22 +488,6 @@ <h2 id="using-the-fltk-config-feature"><a class="header" href="#using-the-fltk-c
488488

489489
</div>
490490

491-
<!-- Livereload script (if served using the cli tool) -->
492-
<script>
493-
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
494-
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
495-
const socket = new WebSocket(wsAddress);
496-
socket.onmessage = function (event) {
497-
if (event.data === "reload") {
498-
socket.close();
499-
location.reload();
500-
}
501-
};
502-
503-
window.onbeforeunload = function() {
504-
socket.close();
505-
}
506-
</script>
507491

508492

509493

docs/Custom-Widgets.html

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -334,22 +334,6 @@ <h1 id="custom-widgets"><a class="header" href="#custom-widgets">Custom widgets<
334334

335335
</div>
336336

337-
<!-- Livereload script (if served using the cli tool) -->
338-
<script>
339-
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
340-
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
341-
const socket = new WebSocket(wsAddress);
342-
socket.onmessage = function (event) {
343-
if (event.data === "reload") {
344-
socket.close();
345-
location.reload();
346-
}
347-
};
348-
349-
window.onbeforeunload = function() {
350-
socket.close();
351-
}
352-
</script>
353337

354338

355339

docs/Dialogs.html

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -571,22 +571,6 @@ <h2 id="printer-dialog"><a class="header" href="#printer-dialog">Printer dialog<
571571

572572
</div>
573573

574-
<!-- Livereload script (if served using the cli tool) -->
575-
<script>
576-
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
577-
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
578-
const socket = new WebSocket(wsAddress);
579-
socket.onmessage = function (event) {
580-
if (event.data === "reload") {
581-
socket.close();
582-
location.reload();
583-
}
584-
};
585-
586-
window.onbeforeunload = function() {
587-
socket.close();
588-
}
589-
</script>
590574

591575

592576

docs/Drag-&-Drop.html

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -330,22 +330,6 @@ <h2 id="dragging-to-draw"><a class="header" href="#dragging-to-draw">Dragging to
330330

331331
</div>
332332

333-
<!-- Livereload script (if served using the cli tool) -->
334-
<script>
335-
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
336-
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
337-
const socket = new WebSocket(wsAddress);
338-
socket.onmessage = function (event) {
339-
if (event.data === "reload") {
340-
socket.close();
341-
location.reload();
342-
}
343-
};
344-
345-
window.onbeforeunload = function() {
346-
socket.close();
347-
}
348-
</script>
349333

350334

351335

0 commit comments

Comments
 (0)