This commit is contained in:
Radon 2025-01-20 19:36:51 -06:00
parent 5589fb8042
commit 02cda9ca0b
3 changed files with 7 additions and 11 deletions

View File

@ -137,7 +137,7 @@ body {
}
.delete-button:hover {
background: var(--pum-button-inactive-fg);
background: var(--timestamp-color);
}
.settings-icon, .users-icon, .theme-icon{
@ -256,7 +256,7 @@ body {
}
.youtube-embed {
position: relative;
position: inline;
padding-top: 10px;
width: 100%;
max-width: 560px; /* Standard YouTube width */

View File

@ -184,29 +184,25 @@ async function loadMessages() {
url,
);
if (videoId) {
return `<div class="youtube-embed">
<iframe
return `<div class="youtube-embed"><iframe
width="100%"
height="315"
src="https://www.youtube.com/embed/${videoId}"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen>
</iframe>
</div>`;
</iframe></div>`;
} else if (isImageUrl(url)) {
console.log(
"Attempting to embed image:",
url,
);
return `<div class="image-embed">
<img
return `<div class="image-embed"><img
src="${url}"
alt="Embedded image"
loading="lazy"
onerror="console.log('Image failed to load:', this.src); this.style.display='none'"
onload="console.log('Image loaded successfully:', this.src)">
</div>`;
onload="console.log('Image loaded successfully:', this.src)"></div>`;
}
return `<a href="${url}" target="_blank" rel="noopener noreferrer">${url}</a>`;
},

View File

@ -3,7 +3,7 @@
### High Priority
- Nothing yet
### Mid Priority
- Nothing yet
- Other embeds (Twitter posts, spotify tracks, soundcloud, github repos, instagram posts, other video platforms)
### Low Priority
- Mobile formatting @media
## Backend