2026-08-19 14:45:15 -06:00
|
|
|
|
import { aliases, defaulttx, meta, translations } from './meta.js';
|
2026-08-18 20:48:25 -06:00
|
|
|
|
import { hasLocalStorage } from './utils.js';
|
2026-07-30 23:58:15 -06:00
|
|
|
|
|
2026-08-24 21:36:03 -06:00
|
|
|
|
const bookTransforms = {
|
|
|
|
|
|
'oba': {
|
|
|
|
|
|
chapter: (ref) => {
|
|
|
|
|
|
return 1;
|
|
|
|
|
|
},
|
|
|
|
|
|
verse: (ref) => {
|
|
|
|
|
|
return ref.getChapter();
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
'jud': {
|
|
|
|
|
|
chapter: (ref) => {
|
|
|
|
|
|
return 1;
|
|
|
|
|
|
},
|
|
|
|
|
|
verse: (ref) => {
|
|
|
|
|
|
return ref.getChapter();
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
'psa': {
|
|
|
|
|
|
match: {
|
|
|
|
|
|
ts: 'LXX',
|
|
|
|
|
|
},
|
|
|
|
|
|
chapter: (ref) => {
|
|
|
|
|
|
return 999;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-07-29 15:24:02 -06:00
|
|
|
|
};
|
|
|
|
|
|
|
2026-08-24 21:36:03 -06:00
|
|
|
|
class Refs {
|
|
|
|
|
|
constructor(book, chapter, verse, ts) {
|
|
|
|
|
|
this._book = aliases[book.toLowerCase()];
|
|
|
|
|
|
this._chapter = chapter;
|
|
|
|
|
|
this._verse = verse;
|
|
|
|
|
|
this._ts = ['OT', 'NT'];
|
|
|
|
|
|
if (ts !== undefined) {
|
|
|
|
|
|
this._ts = ts;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
fullTitle() {
|
|
|
|
|
|
let title = refdata.meta.title+' ';
|
|
|
|
|
|
title += refdata.chapter;
|
|
|
|
|
|
|
|
|
|
|
|
if (refdata.verses?.start > 0) {
|
|
|
|
|
|
title += ':'+refdata.verses.start;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (refdata.verses?.end > 0 && refdata.verses?.end > refdata.verses?.start) {
|
|
|
|
|
|
title += '-'+refdata.verses.end;
|
|
|
|
|
|
}
|
|
|
|
|
|
return title;
|
|
|
|
|
|
}
|
|
|
|
|
|
getChapter() {
|
|
|
|
|
|
if (typeof(this._chapter) === 'number' || (typeof(this._chapter) === 'string' && this._chapter.indexOf('-') == -1)) {
|
|
|
|
|
|
return parseInt(this._chapter);
|
|
|
|
|
|
}
|
|
|
|
|
|
return [parseInt(this._chapter.substr(0, this._chapter.indexOf('-'))),
|
|
|
|
|
|
parseInt(this._chapter.substr(this._chapter.indexOf('-')+1))];
|
|
|
|
|
|
}
|
|
|
|
|
|
get chapter() {
|
|
|
|
|
|
if (this._book in bookTransforms) {
|
|
|
|
|
|
const bt = bookTransforms[this._book];
|
|
|
|
|
|
if ('match' in bt) {
|
|
|
|
|
|
if ('ts' in bt.match && this._ts.indexOf(bt.match.ts) == -1) {
|
|
|
|
|
|
return this.getChapter();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
const tx = bt;
|
|
|
|
|
|
if ('chapter' in tx) {
|
|
|
|
|
|
return tx['chapter'](this);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
return this.getChapter();
|
|
|
|
|
|
}
|
|
|
|
|
|
getVerse() {
|
2026-08-24 21:40:22 -06:00
|
|
|
|
if (typeof(this._verse) === 'string' && this._verse.endsWith('ff')) {
|
|
|
|
|
|
return [parseInt(this._verse.substring(0, this._verse.length-2)), 'ff'];
|
|
|
|
|
|
}
|
2026-08-24 21:36:03 -06:00
|
|
|
|
if (typeof(this._verse) === 'number' || (typeof(this._verse) === 'string' && this._verse.indexOf('-') == -1)) {
|
|
|
|
|
|
return parseInt(this._verse);
|
|
|
|
|
|
}
|
2026-08-24 21:40:22 -06:00
|
|
|
|
return [parseInt(this._verse.substring(0, this._verse.indexOf('-'))),
|
|
|
|
|
|
parseInt(this._verse.substring(this._verse.indexOf('-')+1))];
|
2026-08-24 21:36:03 -06:00
|
|
|
|
}
|
|
|
|
|
|
get verse() {
|
|
|
|
|
|
if (this._book in bookTransforms) {
|
|
|
|
|
|
const tx = bookTransforms[this._book];
|
|
|
|
|
|
if ('verse' in tx) {
|
|
|
|
|
|
return tx['verse'](this);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
return this.getVerse();
|
|
|
|
|
|
}
|
|
|
|
|
|
get meta() {
|
|
|
|
|
|
if (this._book in meta) {
|
|
|
|
|
|
return meta[this.book];
|
|
|
|
|
|
}
|
|
|
|
|
|
return {};
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-08-01 14:07:41 -06:00
|
|
|
|
function parseRef(ref) {
|
2026-08-24 21:36:03 -06:00
|
|
|
|
ref = ref
|
|
|
|
|
|
// Limited URL decoding.
|
|
|
|
|
|
.replace(/%3[Aa]/, ':')
|
|
|
|
|
|
.replace(/\+/, ' ')
|
|
|
|
|
|
// Logos will helpfully replace "-" with "–" in its reference spec.
|
|
|
|
|
|
.replaceAll(/–/g, '-');
|
|
|
|
|
|
const m = ref.match(/((\d+(\+|\s))?[a-zA-Z]+)(\+|\s)?([0-9]+[-0-9]*)?\:?([0-9]+(-?[0-9]+)?)?/);
|
2026-08-03 15:34:10 -06:00
|
|
|
|
|
2026-08-17 19:43:54 -06:00
|
|
|
|
const book = m[1].toLowerCase();
|
2026-08-03 15:34:10 -06:00
|
|
|
|
const chapter = m[5];
|
2026-08-24 21:36:03 -06:00
|
|
|
|
const verses = m[6];
|
2026-08-06 18:19:27 -06:00
|
|
|
|
|
2026-08-03 15:34:10 -06:00
|
|
|
|
if (book === undefined) {
|
|
|
|
|
|
return {};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-08-06 18:19:27 -06:00
|
|
|
|
let refdata = {
|
|
|
|
|
|
ref: ref
|
|
|
|
|
|
};
|
2026-08-17 19:43:54 -06:00
|
|
|
|
if (book in aliases) {
|
|
|
|
|
|
refdata.book = aliases[book];
|
2026-08-05 11:17:39 -06:00
|
|
|
|
}
|
2026-08-17 19:43:54 -06:00
|
|
|
|
refdata.meta = meta[refdata.book];
|
2026-08-06 18:54:19 -06:00
|
|
|
|
refdata.fullTitle = () => {
|
|
|
|
|
|
let title = refdata.meta.title+' ';
|
|
|
|
|
|
title += refdata.chapter;
|
|
|
|
|
|
|
|
|
|
|
|
if (refdata.verses?.start > 0) {
|
|
|
|
|
|
title += ':'+refdata.verses.start;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (refdata.verses?.end > 0 && refdata.verses?.end > refdata.verses?.start) {
|
|
|
|
|
|
title += '-'+refdata.verses.end;
|
|
|
|
|
|
}
|
|
|
|
|
|
return title;
|
|
|
|
|
|
};
|
2026-08-05 11:17:39 -06:00
|
|
|
|
|
2026-08-03 15:34:10 -06:00
|
|
|
|
if (chapter !== undefined) {
|
2026-08-06 18:54:19 -06:00
|
|
|
|
refdata['chapter'] = parseInt(chapter);
|
2026-08-03 15:34:10 -06:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (verses !== undefined) {
|
|
|
|
|
|
if (verses.indexOf('-') < 0) {
|
2026-08-06 15:41:25 -06:00
|
|
|
|
refdata['verses'] = {
|
2026-08-06 18:19:27 -06:00
|
|
|
|
start: parseInt(verses),
|
|
|
|
|
|
end: parseInt(verses)
|
2026-08-06 15:41:25 -06:00
|
|
|
|
};
|
2026-08-03 15:34:10 -06:00
|
|
|
|
} else {
|
|
|
|
|
|
refdata['verses'] = {
|
2026-08-06 18:19:27 -06:00
|
|
|
|
start: parseInt(verses.substring(0, verses.indexOf('-'))),
|
|
|
|
|
|
end: parseInt(verses.substring(verses.indexOf('-')+1))
|
2026-08-03 15:34:10 -06:00
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ('verses' in refdata) {
|
|
|
|
|
|
if (refdata.verses.start < 1) {
|
|
|
|
|
|
refdata.verses.start = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (refdata.verses.end < 1) {
|
|
|
|
|
|
refdata.verses.end = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (refdata.verses.start > refdata.verses.end) {
|
|
|
|
|
|
refdata.verses.end = refdata.verses.start;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return refdata;
|
2026-08-01 14:07:41 -06:00
|
|
|
|
}
|
2026-08-24 21:36:03 -06:00
|
|
|
|
window.Refs = Refs;
|
|
|
|
|
|
window.parseRef = parseRef;
|
2026-08-01 14:07:41 -06:00
|
|
|
|
|
2026-08-18 20:48:25 -06:00
|
|
|
|
class RenderScripture {
|
|
|
|
|
|
translation = 'BSB';
|
|
|
|
|
|
dialog = null;
|
2026-08-19 14:45:15 -06:00
|
|
|
|
sel = null;
|
2026-08-18 20:48:25 -06:00
|
|
|
|
ls = false;
|
2026-08-19 14:45:15 -06:00
|
|
|
|
ref = {};
|
2026-08-18 20:48:25 -06:00
|
|
|
|
|
|
|
|
|
|
constructor(dialog) {
|
|
|
|
|
|
this.dialog = dialog;
|
|
|
|
|
|
|
2026-08-20 11:38:40 -06:00
|
|
|
|
//history.replaceState({dialog: false}, '');
|
2026-08-19 17:53:26 -06:00
|
|
|
|
window.addEventListener('popstate', (evt) => {
|
2026-08-20 11:38:40 -06:00
|
|
|
|
if (this.dialog[0]?.open) {
|
|
|
|
|
|
this.closeDialog();
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
this.dialog[0]?.addEventListener('close', () => {
|
|
|
|
|
|
if (history.state && history.state.dialog) {
|
|
|
|
|
|
history.back();
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
this.dialog[0]?.addEventListener('cancel', (evt) => {
|
|
|
|
|
|
evt.preventDefault();
|
|
|
|
|
|
history.back();
|
|
|
|
|
|
});
|
2026-08-19 17:53:26 -06:00
|
|
|
|
|
2026-08-18 20:48:25 -06:00
|
|
|
|
if (hasLocalStorage()) {
|
|
|
|
|
|
this.ls = true;
|
|
|
|
|
|
this.translation = localStorage.getItem('__translation') || 'BSB';
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const elems = document.querySelectorAll('a[data-scripture]');
|
|
|
|
|
|
elems.forEach((e) => {
|
|
|
|
|
|
e.addEventListener('click', (evt) => {
|
|
|
|
|
|
this.anchorClick(evt)
|
|
|
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
const sel = this.dialog[0]?.querySelector('select.translation');
|
|
|
|
|
|
sel?.addEventListener('change', (evt) => {
|
|
|
|
|
|
this.txnOnChange(evt)
|
|
|
|
|
|
});
|
2026-08-19 14:45:15 -06:00
|
|
|
|
this.sel = sel;
|
2026-08-18 20:48:25 -06:00
|
|
|
|
|
|
|
|
|
|
this.dialog[0]?.addEventListener('click', (evt) => {
|
|
|
|
|
|
if (evt.target === this.dialog[0]) {
|
|
|
|
|
|
this.closeDialog()
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
this.dialog[0]?.querySelector('button[data-close]')?.addEventListener('click', (evt) => {
|
2026-08-20 11:38:40 -06:00
|
|
|
|
if (history.state?.dialog) {
|
|
|
|
|
|
history.back();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.closeDialog();
|
|
|
|
|
|
}
|
2026-08-18 20:48:25 -06:00
|
|
|
|
});
|
|
|
|
|
|
|
2026-08-20 15:01:36 -06:00
|
|
|
|
const url = new URL(document.URL);
|
|
|
|
|
|
if (url.searchParams.get("cite") !== null) {
|
|
|
|
|
|
history.replaceState({dialog: false}, '', '');
|
|
|
|
|
|
this.openDialog(url.searchParams.get("cite"), url.hash.substring(1));
|
|
|
|
|
|
}
|
2026-08-18 20:48:25 -06:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
anchorClick(evt) {
|
2026-08-20 14:52:51 -06:00
|
|
|
|
const scripture = evt.target.attributes.getNamedItem('data-scripture')?.value;
|
2026-08-18 20:48:25 -06:00
|
|
|
|
evt.preventDefault();
|
2026-08-20 14:52:51 -06:00
|
|
|
|
this.openDialog(scripture, evt.target.name);
|
2026-08-18 20:48:25 -06:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
buildTranslationList(sel) {
|
|
|
|
|
|
sel?.replaceChildren();
|
|
|
|
|
|
for (const tx in translations) {
|
2026-08-19 14:45:15 -06:00
|
|
|
|
const testament = meta[this.ref.book].ts;
|
|
|
|
|
|
if (translations[tx][2].indexOf(testament) == -1) {
|
|
|
|
|
|
continue;
|
|
|
|
|
|
}
|
2026-08-18 20:48:25 -06:00
|
|
|
|
const opt = document.createElement('option');
|
|
|
|
|
|
opt.setAttribute('value', tx);
|
|
|
|
|
|
opt.insertAdjacentText('beforeend', translations[tx][0]);
|
|
|
|
|
|
if (tx == this.translation) {
|
|
|
|
|
|
opt.setAttribute('selected', 'selected');
|
|
|
|
|
|
}
|
|
|
|
|
|
sel?.insertAdjacentElement('beforeend', opt);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
closeDialog() {
|
|
|
|
|
|
this.dialog[0]?.close();
|
|
|
|
|
|
this.dialog[0]?.classList.add('hidden');
|
|
|
|
|
|
this.dialog[0]?.querySelector('article')?.replaceChildren();
|
2026-08-20 08:37:07 -06:00
|
|
|
|
//history.replaceState({}, '', '');
|
2026-08-20 08:32:10 -06:00
|
|
|
|
//history.back();
|
2026-08-18 20:48:25 -06:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-08-20 14:52:51 -06:00
|
|
|
|
openDialog(scripture, hash) {
|
|
|
|
|
|
const refs = parseRef(scripture);
|
|
|
|
|
|
this.ref = refs;
|
|
|
|
|
|
this.dialog[0]?.showModal();
|
|
|
|
|
|
this.dialog[0]?.setAttribute('data-scripture', scripture);
|
|
|
|
|
|
this.dialog[0]?.classList.remove("hidden");
|
|
|
|
|
|
this.dialog[0]?.querySelector('.spinner svg')
|
|
|
|
|
|
.classList.remove('hidden');
|
|
|
|
|
|
this.buildTranslationList(this.sel);
|
|
|
|
|
|
this.readScripture(refs);
|
|
|
|
|
|
history.pushState({
|
|
|
|
|
|
dialog: true,
|
|
|
|
|
|
scripture: scripture.value,
|
|
|
|
|
|
tx: this.translation
|
|
|
|
|
|
}, '', `?cite=${scripture}#${hash}`);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-08-18 20:48:25 -06:00
|
|
|
|
txnOnChange(evt) {
|
|
|
|
|
|
const tx = evt.target.selectedOptions[0].value;
|
|
|
|
|
|
this.translation = tx;
|
|
|
|
|
|
if (this.ls) {
|
|
|
|
|
|
localStorage.setItem('__translation', tx);
|
|
|
|
|
|
}
|
|
|
|
|
|
const refs = parseRef(this.dialog[0]?.getAttribute('data-scripture'));
|
|
|
|
|
|
this.dialog[0]?.querySelector('article')?.replaceChildren();
|
|
|
|
|
|
this.dialog[0]?.querySelector('.spinner svg')
|
|
|
|
|
|
.classList.remove('hidden');
|
|
|
|
|
|
this.readScripture(refs);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
readScripture(refs) {
|
2026-08-19 14:45:15 -06:00
|
|
|
|
// Current translation.
|
|
|
|
|
|
let tx = this.translation;
|
|
|
|
|
|
// Previous translation.
|
|
|
|
|
|
const px = this.translation;
|
|
|
|
|
|
|
|
|
|
|
|
const book = refs.book;
|
|
|
|
|
|
const chapter = refs.chapter;
|
|
|
|
|
|
const testament = meta[book].ts;
|
|
|
|
|
|
|
|
|
|
|
|
// If the current translation doesn't contain the testament, switch to
|
|
|
|
|
|
// the default translation that does.
|
|
|
|
|
|
if (translations[tx][2].indexOf(testament) == -1) {
|
|
|
|
|
|
tx = defaulttx[testament];
|
|
|
|
|
|
this.translation = tx;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const uri = `https://bible.helloao.org/api/${tx}/${book.toUpperCase()}/${chapter}.json`;
|
2026-08-18 20:48:25 -06:00
|
|
|
|
fetch(uri)
|
|
|
|
|
|
.then((response) => {
|
|
|
|
|
|
if (!response.ok) {
|
|
|
|
|
|
console.error('query failed');
|
|
|
|
|
|
console.log(response);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
return response.json();
|
|
|
|
|
|
})
|
|
|
|
|
|
.then((response) => {
|
|
|
|
|
|
this.render(response, refs);
|
|
|
|
|
|
this.dialog[0]?.querySelector('.spinner svg')
|
|
|
|
|
|
.classList.add('hidden');
|
2026-08-19 14:45:15 -06:00
|
|
|
|
// Switch translation back if it's forced to a different
|
|
|
|
|
|
// translation from book availability.
|
|
|
|
|
|
if (this.translation != px) {
|
|
|
|
|
|
this.translation = px;
|
|
|
|
|
|
}
|
2026-08-18 20:48:25 -06:00
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
render(response, refs) {
|
|
|
|
|
|
const content = response?.chapter?.content;
|
|
|
|
|
|
let inSpan = false;
|
|
|
|
|
|
|
|
|
|
|
|
if (this.dialog === null || this.dialog === undefined) {
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const section = document.createElement('section');
|
|
|
|
|
|
const article = this.dialog[0]?.querySelector('article');
|
|
|
|
|
|
let para = document.createElement('p');
|
|
|
|
|
|
|
|
|
|
|
|
const heading = document.createElement('h1');
|
|
|
|
|
|
heading.insertAdjacentText('beforeend',
|
|
|
|
|
|
`${refs.fullTitle()}`);
|
|
|
|
|
|
article.insertAdjacentElement('beforeend', heading);
|
|
|
|
|
|
|
|
|
|
|
|
for (const c of content) {
|
|
|
|
|
|
if (c.type === 'heading') {
|
|
|
|
|
|
continue;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let verse = document.createElement('span');
|
|
|
|
|
|
|
|
|
|
|
|
switch (c.type) {
|
|
|
|
|
|
case 'line_break':
|
|
|
|
|
|
if (inSpan) {
|
|
|
|
|
|
section.insertAdjacentElement('beforeend', para);
|
|
|
|
|
|
para = document.createElement('p');
|
|
|
|
|
|
}
|
|
|
|
|
|
break;
|
|
|
|
|
|
case 'verse':
|
|
|
|
|
|
if (!('number' in c)) {
|
|
|
|
|
|
continue;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!('verses' in refs) || (c.number >= refs.verses.start && c.number <= refs.verses.end)) {
|
|
|
|
|
|
inSpan = true;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
inSpan = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (inSpan) {
|
|
|
|
|
|
verse.insertAdjacentText('beforeend', c.number);
|
|
|
|
|
|
verse.classList.add('verse');
|
|
|
|
|
|
para.insertAdjacentElement('beforeend', verse);
|
|
|
|
|
|
verse = document.createElement('span');
|
|
|
|
|
|
for (const v of c.content) {
|
|
|
|
|
|
if (typeof(v) === 'string') {
|
|
|
|
|
|
para.insertAdjacentText('beforeend', v+' ');
|
|
|
|
|
|
continue
|
|
|
|
|
|
}
|
|
|
|
|
|
if ('lineBreak' in v) {
|
|
|
|
|
|
if (para.innerHTML.length != 0 || para.innerText.length != 0) {
|
|
|
|
|
|
section.insertAdjacentElement('beforeend', para);
|
|
|
|
|
|
para = document.createElement('p');
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if ('text' in v) {
|
|
|
|
|
|
para.insertAdjacentText('beforeend', v.text);
|
|
|
|
|
|
if ('poem' in v) {
|
|
|
|
|
|
para.classList.add('poem-'+v.poem);
|
|
|
|
|
|
if (para.innerHTML.length != 0 || para.innerText.length != 0) {
|
|
|
|
|
|
section.insertAdjacentElement('beforeend',
|
|
|
|
|
|
para);
|
|
|
|
|
|
}
|
|
|
|
|
|
para = document.createElement('p');
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
|
|
|
console.error('unhandled type:', c.type);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
section.insertAdjacentElement('beforeend', para);
|
|
|
|
|
|
article.insertAdjacentElement('beforeend', section);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-29 15:24:02 -06:00
|
|
|
|
export const bindModals = () => {
|
2026-07-29 22:55:24 -06:00
|
|
|
|
const elems = document.querySelectorAll('a[data-scripture]');
|
|
|
|
|
|
const dialog = document.querySelectorAll('dialog[data-scripture]');
|
2026-08-18 20:48:25 -06:00
|
|
|
|
const renderer = new RenderScripture(dialog);
|
2026-08-17 19:43:54 -06:00
|
|
|
|
};
|