Skip to content

Commit c942721

Browse files
committed
web: Give better when config can't be loaded
1 parent c6edfc0 commit c942721

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

web/index.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
</head>
1212
<body>
1313

14+
<div class="status"></div>
15+
1416
<div class="ssl-warning" style="display:none; color: maroon">
1517
You are currently using HTTPS. Unfortunately OBS probably isn't
1618
using SSL and browsers only allow SSL websocket connections from
@@ -29,7 +31,7 @@
2931
<p>Arguments are given via URL fragments (not query arguments): <code>#url=localhost:4455&password=XXXXX</code></p>
3032

3133
<script>
32-
init_all()
34+
init_rellinks()
3335
</script>
3436

3537
<body>

web/util.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ async function forEachAsync(querySelector, func) {
2626

2727
// Load global configuration
2828
async function load_config () {
29-
response = await fetch("config.yaml")
30-
text = await response.text()
29+
response = await fetch("config.yaml").catch(update_status("Can not load config.yaml"))
30+
console.log(response)
31+
text = await response.text().catch(update_status("config.yaml data not loaded"))
3132
CONFIG = jsyaml.load(text)
3233
globalThis.CONFIG = CONFIG
3334
// Make mapping human name -> scene names

0 commit comments

Comments
 (0)