check for http/https for video embeds

This commit is contained in:
MathMan05 committed 2026-07-16 13:52:42 -05:00
1 parent 2452973373
commit 033d931af3
1 file changed
+1
+1
View File
@@ -462,6 +462,7 @@ class Embed {
img.onclick = async () => {
if (this.json.video) {
const url = new URL(this.json.video.url);
if (!(url.protocol === "http:" || url.protocol === "https:")) return;
if (url.host !== "youtube.com") return;
img.remove();
const iframe = document.createElement("iframe");