summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/index.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/web/index.html b/web/index.html
index e02159c..d176c2a 100644
--- a/web/index.html
+++ b/web/index.html
@@ -103,7 +103,7 @@
</head>
<body>
<div id="intro">
- <img id="intro-img" src="/intro.jpg" alt="">
+ <img id="intro-img" src="/intro.jpg" alt="" onerror="this.remove()">
<h1 id="intro-zh">批斗大会</h1>
<h2 id="intro-en">STRUGGLE SESSION</h2>
<div class="hint"><span class="key">&#9166;</span> Press enter to start</div>
@@ -241,7 +241,8 @@
function showIntro(cfg) {
document.getElementById('intro-zh').textContent = cfg.introZH || '';
document.getElementById('intro-en').textContent = cfg.introEN || '';
- const img = document.getElementById('intro-img');
+ const img = document.getElementById('intro-img'); // may already be gone (no picture)
+ if (!img) return;
if (cfg.introImg) img.src = cfg.introImg; else img.remove();
introEl.hidden = false;
introVisible = true;