Merge pull request 'Improved video handling in reply' (#73) from BordedDev/snek:bugfix/video-handling-in-reply into main
Reviewed-on: #73 Reviewed-by: retoor <retoor@noreply@molodetz.nl>
This commit is contained in:
		
						commit
						767048d79b
					
				| @ -34,6 +34,12 @@ export class ReplyEvent extends Event { | |||||||
|       img.replaceWith(document.createTextNode(src)); |       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
 |     // Replace <iframe> with their src
 | ||||||
|     newMessage.querySelectorAll('iframe').forEach(iframe => { |     newMessage.querySelectorAll('iframe').forEach(iframe => { | ||||||
|       const src = iframe.src || iframe.currentSrc; |       const src = iframe.src || iframe.currentSrc; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user