Skip to content

Commit 5f51206

Browse files
committed
minor
1 parent 9f209ca commit 5f51206

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

2-ui/1-document/11-coordinates/head.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
<script>
22
document.addEventListener('DOMContentLoaded', function() {
33

4-
document.getElementById('coords-show-mark').onclick = function() {
4+
let elem = document.getElementById('coords-show-mark');
5+
6+
// no elem in ebook mode
7+
if (elem) {
8+
elem.onclick = function() {
59
let elem = document.getElementById("coords-show-mark");
610

711
function createMessageUnder(elem, text) {
@@ -21,6 +25,7 @@
2125
document.body.append(message);
2226
setTimeout(() => message.remove(), 5000);
2327
}
28+
}
2429

2530
});
2631

0 commit comments

Comments
 (0)