Spaces:
Sleeping
Sleeping
Omar ID EL MOUMEN
commited on
Commit
·
959f2b1
1
Parent(s):
ad1e294
Mini-patch #3
Browse files- static/script.js +4 -4
static/script.js
CHANGED
|
@@ -163,15 +163,15 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
| 163 |
}
|
| 164 |
let t = "";
|
| 165 |
if(Array.isArray(data.titles)){
|
| 166 |
-
|
| 167 |
-
if(
|
| 168 |
t += title + "<br>"
|
| 169 |
-
} else if (
|
| 170 |
t += "<pre>" + title + "<br></pre>"
|
| 171 |
} else {
|
| 172 |
t += title + "<br>"
|
| 173 |
}
|
| 174 |
-
}
|
| 175 |
popupText.innerHTML = t;
|
| 176 |
} else {
|
| 177 |
popupText.textContent = data.titles;
|
|
|
|
| 163 |
}
|
| 164 |
let t = "";
|
| 165 |
if(Array.isArray(data.titles)){
|
| 166 |
+
for(const [lvl, title] of data.titles){
|
| 167 |
+
if(lvl == 1){
|
| 168 |
t += title + "<br>"
|
| 169 |
+
} else if (lvl == 2) {
|
| 170 |
t += "<pre>" + title + "<br></pre>"
|
| 171 |
} else {
|
| 172 |
t += title + "<br>"
|
| 173 |
}
|
| 174 |
+
}
|
| 175 |
popupText.innerHTML = t;
|
| 176 |
} else {
|
| 177 |
popupText.textContent = data.titles;
|