Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CuentosHistorias.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ <h2>Cuentos Publicados</h2>
if (url) {
const youtubeRegex = /(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:watch\?v=|embed\/)|youtu\.be\/)([a-zA-Z0-9_-]{11})/;
const wistiaRegex = /^(?:https?:\/\/)?(?:www\.)?wistia\.(?:com|net)\/medias\/([a-zA-Z0-9_-]+)/;

let match = url.match(youtubeRegex);
let embedUrl;

Expand Down Expand Up @@ -240,7 +240,7 @@ <h2>Cuentos Publicados</h2>
const url = link.href;
let match = url.match(youtubeRegex);
let embedUrl;

if (match) {
embedUrl = `https://www.youtube.com/embed/${match[1]}`;
} else {
Expand All @@ -249,7 +249,7 @@ <h2>Cuentos Publicados</h2>
embedUrl = `https://fast.wistia.net/embed/iframe/${match[1]}`;
}
}

if (embedUrl) {
const iframe = document.createElement('iframe');
iframe.setAttribute('src', embedUrl);
Expand Down