Changed song lyrics to links#4
Conversation
Each link leads to a properly formatted YouTube search, opens in a new tab when clicked on.
|
Oh! That's creative and nice. I really like it. I'll do some quick testing on this later this week and very likely merge it. Thanks for the awesome PR! |
|
Do we handle links which is invalid by providing a check? |
|
@jasonahjie that's kind of a cool idea. I'm thinking about adjusting this so that instead of making the entire lyric be a link, just append a little search icon to the string and make that a link with the |
|
@jasonahjie The lyrics are hardcoded in the php file, and the only characters that would throw off the search request were apostrophes and commas. The code I wrote replaces instances of those with the proper search terms. It might not hurt to add further checks in case YouTube changes its search query pattern. @brashrebel Sounds good. I was trying to think of how to have the link more subtle, that definitely would do it. One possible solution might be something like:
This would place the "unicode speaker with sound waves" icon (🔊) after the song title as a link to the youtube search with the title you mentioned. Alternatively, there's also the 🔍 unicode icon which would be F50D;. |
Each link leads to a properly formatted YouTube search, opens in a new tab when clicked on.