Define functions on the top

This commit is contained in:
Hans5958 2022-05-11 13:15:42 +07:00
parent bd030f8cfb
commit 965af652d4

View file

@ -13,7 +13,6 @@
========================================================================
*/
function createInfoBlock(entry, isPreview) {
function createLabel(name, value, parent) {
const nameElement = document.createElement("span")
nameElement.className = "fw-bold"
@ -24,6 +23,7 @@ function createInfoBlock(entry, isPreview) {
parent.appendChild(valueElement)
return parent
}
function createInfoListItem(name, value) {
const entryInfoListElement = document.createElement("li")
entryInfoListElement.className = "list-group-item"
@ -31,6 +31,7 @@ function createInfoBlock(entry, isPreview) {
return entryInfoListElement
}
function createInfoBlock(entry, isPreview) {
const element = document.createElement("div")
element.className = "card mb-2 overflow-hidden shadow"