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

View File

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

View File

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