mirror of
https://github.com/smartyellow/status.git
synced 2025-01-18 13:37:59 +00:00
Relative links
This commit is contained in:
parent
670fe76249
commit
b258fb2285
@ -88,7 +88,10 @@
|
||||
|
||||
onMount(() => {
|
||||
proportionalGrid();
|
||||
const ws = new WebSocket('ws://__SERVER__/status/dashboard/socket');
|
||||
|
||||
const ws = new WebSocket(
|
||||
window.location.href.replace('http', 'ws') + '/socket'
|
||||
);
|
||||
|
||||
ws.onmessage = async evt => {
|
||||
const data = JSON.parse(evt.data || '""');
|
||||
|
@ -42,7 +42,7 @@ export const shuffle = crossfade({
|
||||
});
|
||||
|
||||
export function ringBell() {
|
||||
const bell = new Audio('http://__SERVER__/statusdashboard/sound');
|
||||
const bell = new Audio(window.location.href + '/sound');
|
||||
bell.addEventListener('canplaythrough', () => bell.play());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user