Improved video handling in quote

This commit is contained in:
BordedDev 2025-10-04 16:39:00 +02:00
parent f0e68cb31e
commit 37e872809b

View File

@ -34,6 +34,12 @@ export class ReplyEvent extends Event {
img.replaceWith(document.createTextNode(src));
});
// Replace <video> with just their src
newMessage.querySelectorAll('video').forEach(vid => {
const src = vid.src || vid.currentSrc || vid.querySelector('source').src;
vid.replaceWith(document.createTextNode(src));
});
// Replace <iframe> with their src
newMessage.querySelectorAll('iframe').forEach(iframe => {
const src = iframe.src || iframe.currentSrc;