MCPcopy Create free account
hub / github.com/Bitbox-Connect/Bitbox / modifyYouTubeLink

Function modifyYouTubeLink

client/src/component/AddProject.jsx:68–75  ·  view source on GitHub ↗
(link)

Source from the content-addressed store, hash-verified

66
67 // Function to modify YouTube link (from watch to embed URL)
68 const modifyYouTubeLink = (link) => {
69 if (link.includes("youtube.com/watch?v=")) {
70 const videoId = link.split("youtube.com/watch?v=")[1];
71 return `https://www.youtube.com/embed/${videoId}`;
72 } else {
73 return link; // Return unmodified link if it doesn't match expected format
74 }
75 };
76
77 const themeStyles = mode === 'dark' ? 'bg-gray-800 text-white' : 'bg-white text-gray-900';
78

Callers 1

handleSubmitFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected