Created
February 14, 2025 04:28
-
-
Save PatheticMustan/82099ede01775ba2902ed420d806d102 to your computer and use it in GitHub Desktop.
just a small idea
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
words = "my name is".split(" ").map(v => v.toLowerCase()); | |
urls = words.map(word => x.find(v => word.indexOf(v.clean_text.toLowerCase()) !== -1)).filter(v => v !== undefined).map(v => v.url); | |
let content = ""; | |
urls.map(url => { | |
let embedlink = "http://www.youtube.com/embed/" + url.split("?v=")[1]; | |
content += `<iframe width="560" height="315" src="${embedlink}?controls=0&autoplay=1&loop=1" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>` | |
}); | |
document.body.innerHTML = content; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment