Download the free lesson with tab here
http://www.coffeebreakgrooves.com/Vid...
Ric Daude Funk 1-3 Cm 100 bpm free lick lesson!
// {
if (thumb.dataset.status) return;
let parentLink = thumb.closest('a');
if (!parentLink || !parentLink.href || !parentLink.href.includes('.html')) return;
let currentBg = thumb.style.backgroundImage || "";
thumb.dataset.status = "processing";
fetch(parentLink.href)
.then(response => response.text())
.then(html => {
// Create a virtual browser document to safely search the HTML
let parser = new DOMParser();
let doc = parser.parseFromString(html, 'text/html');
// Look for ANY iframe containing youtube or youtu.be
let ytIframe = doc.querySelector('iframe[src*="youtube.com"], iframe[src*="youtube-nocookie.com"], iframe[src*="youtu.be"]');
let videoId = null;
if (ytIframe) {
let src = ytIframe.src;
// Extract the ID from the iframe source using a URL object for perfect accuracy
try {
let url = new URL(src.startsWith('//') ? 'https:' + src : src);
if (url.pathname.includes('/embed/')) {
videoId = url.pathname.split('/embed/')[1].split('?')[0];
} else if (url.pathname.includes('/v/')) {
videoId = url.pathname.split('/v/')[1].split('?')[0];
} else if (url.searchParams.has('v')) {
videoId = url.searchParams.get('v');
}
} catch(e) {
// Fallback Regex just for the extracted iframe src
let match = src.match(/([a-zA-Z0-9_-]{11})/);
if (match) videoId = match[1];
}
}
if (videoId) {
let hqThumb = "https://i.ytimg.com/vi/" + videoId + "/hqdefault.jpg";
let mqThumb = "https://i.ytimg.com/vi/" + videoId + "/mqdefault.jpg";
let imgChecker = new Image();
imgChecker.onload = function() {
thumb.style.backgroundImage = "url('" + hqThumb + "')";
thumb.dataset.status = "done";
};
imgChecker.onerror = function() {
thumb.style.backgroundImage = "url('" + mqThumb + "')";
thumb.dataset.status = "done-fallback";
};
imgChecker.src = hqThumb;
} else {
// WE FAILED TO FIND A VIDEO.
// If it's still using the broken proxy, log a warning so we can investigate!
if (currentBg.includes("blogger_img_proxy")) {
console.warn("FAILED to find YouTube ID in post: " + parentLink.href);
}
thumb.dataset.status = "no-video";
}
})
.catch(err => {
console.error("Failed to fetch post HTML for " + parentLink.href, err);
thumb.dataset.status = "error";
});
});
}
fixThumbnails();
setInterval(fixThumbnails, 2000);
});
//]]>