From a4dec00230114043cb1ddc862162f2dbc90d56be Mon Sep 17 00:00:00 2001 From: MattIPv4 Date: Wed, 17 Jan 2024 02:49:58 +0000 Subject: [PATCH] Avoid cookies for YouTube embed --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 78f2a03..8febf2b 100644 --- a/src/index.js +++ b/src/index.js @@ -30,7 +30,7 @@ document.addEventListener('DOMContentLoaded', () => { // Inject the YouTube video const iframe = document.createElement('iframe'); const videoId = link.href.match(/^https:\/\/(?:www\.youtube\.com\/watch\?v=|youtu\.be\/)(.+)$/)[1]; - iframe.src = `https://www.youtube.com/embed/${videoId}?autoplay=1&rel=0`; + iframe.src = `https://www.youtube-nocookie.com/embed/${videoId}?autoplay=1&rel=0`; iframe.frameborder = 0; modal.appendChild(iframe);