changes
This commit is contained in:
parent
5589fb8042
commit
02cda9ca0b
@ -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 */
|
||||
|
@ -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>`;
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user