mirror of
https://github.com/Starlio-app/StarlioX
synced 2024-11-06 06:13:57 +03:00
Fixed a bug where re-hiding the description did not work correctly
This commit is contained in:
parent
69e150979f
commit
779f897027
1 changed files with 3 additions and 2 deletions
|
@ -109,7 +109,8 @@ function wallpaperLoad(data) {
|
||||||
|
|
||||||
ids[id]['copyright'] = ids[id]['copyright'] === undefined ? "NASA" : ids[id]['copyright'];
|
ids[id]['copyright'] = ids[id]['copyright'] === undefined ? "NASA" : ids[id]['copyright'];
|
||||||
|
|
||||||
let explanation = ids[id]['explanation'].length > 200 ? ids[id]['explanation'].slice(0, 200) + "..." : ids[id]['explanation'];
|
const explanation = ids[id]['explanation'].length > 200 ? ids[id]['explanation'].slice(0, 200) + "..." : ids[id]['explanation'];
|
||||||
|
console.log(explanation);
|
||||||
if (ids[id]['media_type'] === "image") {
|
if (ids[id]['media_type'] === "image") {
|
||||||
title.innerHTML = `<h5 class="modal-title">${ids[id]['title']}</h5>`;
|
title.innerHTML = `<h5 class="modal-title">${ids[id]['title']}</h5>`;
|
||||||
img.innerHTML = `
|
img.innerHTML = `
|
||||||
|
@ -192,7 +193,7 @@ function wallpaperLoad(data) {
|
||||||
explanation.innerHTML = `<strong>Explanation:</strong> ${ids[id]['explanation']}`;
|
explanation.innerHTML = `<strong>Explanation:</strong> ${ids[id]['explanation']}`;
|
||||||
showMore.innerHTML = "Show less";
|
showMore.innerHTML = "Show less";
|
||||||
} else {
|
} else {
|
||||||
explanation.innerHTML = explanation.innerHTML.slice(0, 200) + "...";
|
explanation.innerHTML = `<strong>Explanation:</strong> ${ids[id]['explanation'].length > 200 ? ids[id]['explanation'].slice(0, 200) + "..." : ids[id]['explanation']}`;
|
||||||
showMore.innerHTML = "Show more";
|
showMore.innerHTML = "Show more";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue