Javascript Code Function to Convert YouTube Video URL to Embed Code
Take a youtube video url like [https://www.youtube.com/watch?v=Tw0a56uwjRo] and convert it into its embed url [https://www.youtube.com/embed/Tw0a56uwjRo] which makes it so the video won't get blocked from being displayed on a web page because of [Refused to display 'https://www.youtube.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'].
Take a youtube video url like [https://www.youtube.com/watch?v=Tw0a56uwjRo] and convert it into its embed url [https://www.youtube.com/embed/Tw0a56uwjRo] which makes it so the video won't get blocked from being displayed on a web page because of Refused to display 'https://www.youtube.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'
.