Merge pull request #469 from blastshielddown/update-wavlake-embed
Update Wavlake embed to support .com links
This commit is contained in:
commit
29c80c4259
@ -168,5 +168,4 @@ export const MagnetRegex = /(magnet:[\S]+)/i;
|
|||||||
/**
|
/**
|
||||||
* Wavlake embed regex
|
* Wavlake embed regex
|
||||||
*/
|
*/
|
||||||
export const WavlakeRegex =
|
export const WavlakeRegex = /(?:player\.)?wavlake\.com\/(track\/[.a-zA-Z0-9-]+|album\/[.a-zA-Z0-9-]+|[.a-zA-Z0-9-]+)/i;
|
||||||
/player\.wavlake\.com\/(?!feed\/)(track\/[.a-zA-Z0-9-]+|album\/[.a-zA-Z0-9-]+|[.a-zA-Z0-9-]+)/i;
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const WavlakeEmbed = ({ link }: { link: string }) => {
|
const WavlakeEmbed = ({ link }: { link: string }) => {
|
||||||
const convertedUrl = link.replace("player.wavlake.com", "embed.wavlake.com");
|
const convertedUrl = link.replace(/(?:player\.)?wavlake\.com/, "embed.wavlake.com");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<iframe
|
<iframe
|
||||||
|
Loading…
x
Reference in New Issue
Block a user