mirror of
https://github.com/MathMan05/Fermi.git
synced 2026-10-23 15:02:28 +00:00
check for http/https for video embeds
This commit is contained in:
1 file changed
+1
@@ -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");
|
||||
|
||||
Reference in new issue
Block a user