-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
37 lines (34 loc) · 1.15 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Test</title>
<script type="module">
import { getByBCV, getByBC } from './src/index.js'
function ready() {
const input = document.querySelector("#input")
const button = document.querySelector("#button")
const result1 = document.querySelector("#result1")
const result2 = document.querySelector("#result2")
button.addEventListener('click', () => {
const ref = input.value
const [book, chapter, verse] = ref.split(' ')
result1.innerHTML = JSON.stringify(getByBCV({ book, chapter, verse }), null, 2)
result2.innerHTML = JSON.stringify(getByBC({ book, chapter }), null, 2)
})
}
document.addEventListener("DOMContentLoaded", ready);
</script>
</head>
<body>
<input id="input" value="gen 1 1" placeholder="gen 1 1" />
<br>
<button id="button">Get cross references</button>
<div>getByBCV</div>
<pre id="result1"></pre>
<div>getByBC</div>
<pre id="result2"></pre>
</body>
</html>